1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
emacs/test/lisp/calc
Mattias Engdegård 7c1c251916 Calc: speed up math-read-preprocess-string (bug#67536)
`math-read-preprocess-string` is one of the bottlenecks of `calc-eval`
and was unnecessarily slow even with no substitutions made.
This affected org-mode in particular, where `calc-eval` is called
repeatedly to recalculate tables.

Reported by Raffael Stocker who also wrote the unit tests here.

* lisp/calc/calc-aent.el (math--read-preprocess-re-cache): New.
(math-read-preprocess-string):
Use math--read-preprocess-re-cache, first computing it if necessary.
* test/lisp/calc/calc-tests.el (calc-math-read-preprocess-string):
New test.
2023-12-19 17:11:07 +01:00
..
calc-tests.el Calc: speed up math-read-preprocess-string (bug#67536) 2023-12-19 17:11:07 +01:00