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

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

bug#15294: 24.3.50; js2-mode parser is several times slower in lexical-b


From: Stefan Monnier
Subject: bug#15294: 24.3.50; js2-mode parser is several times slower in lexical-binding mode
Date: Fri, 13 Sep 2013 09:01:03 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> What people should know is that
>> 
>> (let (x y z)
>> ...(setq x ...)
>> ...(setq z ...)
>> ...(setq y ...)
>> 
>> is often a bad idea in Elisp, and even more so in lexical-binding code
>> (in some cases, if a variable is immutable it can be handled
>> significantly more efficiently, so the mere existence of a single `setq'
>> on a variable can sometimes slow other chunks of code: in many cases
>> `let' is cheaper than `setq').

> Thank you for both answers.  Will the second apply even after making the
> byte-compiler improvements described for the first?  (I'm guessing yes.)
> If so, you might want to mention this guideline in the manual.

Yes.


        Stefan





reply via email to

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