[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] org-table-to-lisp enhanced
From: |
tbanelwebmin |
Subject: |
[PATCH] org-table-to-lisp enhanced |
Date: |
Sun, 25 Feb 2024 11:40:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
Here is a new version of `org-table-to-lisp'. Why a new version?
- Because it is more than 3x faster than the current one.
Bench-marked on a 3822 rows by 16 columns Org table
- current: 0.405 seconds
- new one: 0.122 seconds
on Emacs 30.0.50 with native compilation
The speedup is achieved with or without native compilation.
- Because it does not use regexps anymore.
It uses `following-char'
instead of `re-search-forward'
Therefore the global regexp state is no longer clobbered.
- Because after a 120x speedup in May 2020
(by Nicolas Goaziou and myself)
it is funny to discover yet another way to a 3x speedup.
- Because org-table-to-lisp is a basic
building block of Org Mode, used in
- table alignment
- table export
- Babel
- plotting
- table transposition
- Because this version is a drop-in replacement.
The overall algorithm does not changed.
I ran all the standard unit tests of Org Mode as of [2024-02-24]. All
went as expected.
Have fun
Thierry
0001-org-table.el-Enhanced-table-parsing.patch
Description: Text Data
- [PATCH] org-table-to-lisp enhanced,
tbanelwebmin <=