bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67536: 29.1; Calc mode's math-read-preprocess-string conses unnecess


From: Mattias Engdegård
Subject: bug#67536: 29.1; Calc mode's math-read-preprocess-string conses unnecessarily
Date: Sun, 3 Dec 2023 11:43:07 +0100

2 dec. 2023 kl. 20.26 skrev Raffael Stocker <r.stocker@mnet-mail.de>:

> Is this the case? As ‘mapc’ is implemented directly in C and ‘dolist’
> falls back to ‘while’, I thought it would be the other way around.

It's the function calls that are expensive. `dolist` just expands to a loop.
It's even worse if the lambda expression accesses variables outside (which 
wasn't the case here) because that forces creation of a closure.

> However, I checked your proposed version and there is an issue with
> replacement of sub- and superscripts.

Look at that, I got the semantics wrong. Sorry about that. Here's a new patch.
A lot less pretty this time.

In any case, make sure to include unit tests in your final patch.

The whole problem is compounded by the public variables 
(math-read-replacement-list etc) that we somehow feel a need to keep unchanged 
just in case some user modifies them, despite this almost certainly never 
happens.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]