emacs-devel
[Top][All Lists]
Advanced

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

Re: Ideal performance of ELisp


From: Stefan Monnier
Subject: Re: Ideal performance of ELisp
Date: Sat, 13 Aug 2022 10:07:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> > Once the VM supports proper tail recursion, it's straightforward to
>> > generate automata that never perform a function call, at least not as part
>> > of the recognizer.
>>
>> It was straightforward beforehand as well (using a `while` loop instead
>> of recursion).  And if you do use recursion, then it's not very much
>> simpler with `lexical-binding` than without because you still have to
>> take into account the possibility that the function gets redefined
>> during your recursion :-(
>>
>
> I think you're mistaking self-tail recursion for tail recursion.

No, I was simply restricting the discussion to the case you mention of
"generat[ing an] automata", in which case you usually have enough
control over the generated code to use a `while` loop if desired.


        Stefan




reply via email to

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