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 #27 received at 15294 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 15294 <at> debbugs.gnu.org
Subject: RE: bug#15294: 24.3.50; js2-mode parser is several times slower in
 lexical-binding mode
Date: Thu, 12 Sep 2013 20:59:52 -0700 (PDT)
> It seems the slowdown is indeed linked to the way `catch' is handled
> (indeed, this non-idiomatic ELisp code ends up byte-compiled in a really
> poor way). The trivial patch below brings the time down from 5s to 2.6s
> (as compared to 2.1s for the dynamic-binding version).
>
> -  (let (c c1 identifier-start is-unicode-escape-start
> -        contains-escape escape-val str result base
> -        is-integer quote-char val look-for-slash continue)
> -    (catch 'return
> +  (catch 'return
> +    (let (c c1 identifier-start is-unicode-escape-start
> +            contains-escape escape-val str result base
> +            is-integer quote-char val look-for-slash continue)

Not really following this thread, but this caught my eye.  Is this
something that should be mentioned as a guideline in the manual?

Or is the byte compiler likely to be improved in this regard, so users
need not be aware of it and take measures manually?




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.