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

From: Dmitry Gutov <[email-masked]>
Date: Sun, 22 Sep 2013 07:56:34 +0300

Stefan Monnier <[email-masked]> writes:

> I now have a tentative patch which introduces new bytecodes for
> "catch" which avoid the need to create closures for
> lexical-binding code.
>
> Current results:
> - dynbind old-bytecode: 0.84s
> - dynbind new-bytecode: 0.83s
> - lexbind old-bytecode: 2.14s
> - lexbind new-bytecode: 0.67s

Looks impressive!

> Of course, code compiled with the new bytecodes won't run on
> non-bleeding edge Emacs.

Sure.

> Similar changes would be welcome for condition-case and
> unwind-protect, and since adding new bytecodes is something I'd rather
> not do too often (and since there aren't many unused bytecodes left),
> I'll try to get a complete patch first to make sure I don't have to
> change my mind and use different byte codes.

There's absolutely no hurry, I'm not going to switch js2-mode to
lexical-binding until after 24.4 is out.