[Top][All Lists]

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

Re: Lexical binding: why?

From: Dmitry Gutov
Subject: Re: Lexical binding: why?
Date: Tue, 28 May 2019 16:46:31 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 28.05.2019 16:25, Stefan Monnier wrote:
Maybe the speed up I remember was linked to the rework I suggested back
then to work around the poor lexical-scoping performance (mainly moving
a condition-case outside of a loop, IIRC) and that actually improved
performance with both lexical and dynamic binding?

No, you remembered correctly: without the new byte-code, the situation was noticeably worse. Though maybe it was a 'throw' inside a loop with 'catch' outside it.

The 10% figure I just got from this thread: https://github.com/mooz/js2-mode/issues/524#issuecomment-483010120

But it's actually comparing against an older js2-mode version, not against the current code in dynamic-binding mode. I don't have time to redo the measurements now myself, but thinking back, maybe the result of the byte-code introduction was that lexical-binding became slightly faster than dynamic, though not by much.

reply via email to

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