emacs/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-aent.el Calc: speed up math-read-preprocess-string (bug#67536) 2023-12-19 17:11:07 +01:00
calc-alg.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-arith.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-bin.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-comb.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-cplx.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-embed.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-ext.el Use substitute-command-keys more in Calc help 2023-02-17 17:49:53 +01:00
calc-fin.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-forms.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-frac.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-funcs.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-graph.el Use delq return value (bug#61730) 2023-05-20 11:05:57 +02:00
calc-help.el Use substitute-command-keys more in Calc help 2023-02-17 17:49:53 +01:00
calc-incom.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-keypd.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-lang.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-macs.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-map.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-math.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-menu.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-misc.el Fix interactive forms in some Lisp packages 2023-05-06 11:29:58 +03:00
calc-mode.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-mtx.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-nlfit.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-poly.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-prog.el Fix interactive forms in some Lisp packages 2023-05-06 11:29:58 +03:00
calc-rewr.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-rules.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-sel.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-stat.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-store.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-stuff.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-trail.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-undo.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-units.el ; * lisp/calc/calc-units.el (math-standard-units): Fix typo. 2023-11-29 17:02:22 +01:00
calc-vec.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc-yank.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calc.el Cease preloading touch-screen.el outside X and Android 2023-12-06 10:34:41 +08:00
calcalg2.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calcalg3.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calccomp.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calcsel2.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00