GNU bug report logs - #15294
24.3.50; js2-mode parser is several times slower in lexical-binding mode

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Fri, 6 Sep 2013 21:01:02 UTC

Severity: normal

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #36 received at 15294 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 15294 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: 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
>> 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




This bug report was last modified 10 years and 240 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.