From: Dmitry Gutov <dgutov@yandex.ru>
To: 15294@debbugs.gnu.org
Subject: bug#15294: 24.3.50; js2-mode parser is several times slower in lexical-binding mode
Date: Fri, 06 Sep 2013 23:59:20 +0300 [thread overview]
Message-ID: <871u51ll93.fsf@yandex.ru> (raw)
If I append -*- lexical-binding: t -*- to the first line of js2-mode.el
and eval the buffer, parsing a file takes several (3 to 4) times longer.
To measure:
0. Install js2-mode, e.g. from GNU ELPA.
1. Save
http://mootools.net/download/get/mootools-core-1.4.5-full-nocompat.js to
some local directory, open it in Emacs.
2. If it opens in some other mode than js2-mode, M-x js2-mode.
3. Don't touch the keys, wait until the file is parsed (the parsing gets
interrupted and rescheduled on input). When redisplay works again, we
can re-parse the file again and measure the time it takes.
4. eval-expression (js2-time (js2-reparse t)), wait until the message
area displays the amount of seconds the process took.
To measure the performance in interpreted mode, open js2-mode.el, M-x
eval-buffer and go through the above scenario (1-4).
To measure the performance in compiled mode, M-x byte-compile-file, then
(load "js2-mode.elc"), then go through the scenario.
My measurements:
lexical-binding | no | yes |
Interpreted | 1 sec | 4.26 sec |
Compiled | 0.63 sec | 1.76 sec |
--
In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
of 2013-09-06 on axl
Bzr revision: 114159 dmantipov@yandex.ru-20130906164012-6j0s6otwkypj9s1z
Windowing system distributor `The X.Org Foundation', version 11.0.11303000
System Description: Ubuntu 13.04
next reply other threads:[~2013-09-06 20:59 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 20:59 Dmitry Gutov [this message]
2013-09-06 23:44 ` bug#15294: 24.3.50; js2-mode parser is several times slower in lexical-binding mode Xue Fuqiao
2013-09-07 3:15 ` Stefan Monnier
2013-09-08 22:32 ` Stefan Monnier
2013-09-10 2:04 ` Stefan Monnier
2013-09-13 3:40 ` Stefan Monnier
2013-09-13 3:59 ` Drew Adams
2013-09-13 4:37 ` Stefan Monnier
2013-09-13 5:45 ` Drew Adams
2013-09-13 13:01 ` Stefan Monnier
2013-09-14 0:09 ` Lexical let and setq Michael Welsh Duggan
2013-09-14 3:46 ` Stefan Monnier
2013-09-14 11:13 ` Lars Magne Ingebrigtsen
2013-09-14 14:04 ` Pascal J. Bourguignon
2013-09-15 5:11 ` Stefan Monnier
2013-09-14 21:47 ` Richard Stallman
2013-09-15 5:09 ` Stefan Monnier
2013-09-15 16:54 ` Richard Stallman
2013-09-15 17:06 ` Stefan Monnier
2013-09-16 10:47 ` Richard Stallman
2013-09-14 4:20 ` bug#15294: 24.3.50; js2-mode parser is several times slower in lexical-binding mode Dmitry Gutov
2013-09-14 14:27 ` Stefan Monnier
2013-09-15 0:11 ` Dmitry Gutov
2013-09-15 5:04 ` Stefan Monnier
2013-09-15 16:54 ` Richard Stallman
2013-09-15 0:24 ` Dmitry Gutov
2013-09-15 5:06 ` Stefan Monnier
2013-09-18 23:48 ` Stefan Monnier
2013-09-22 4:56 ` Dmitry Gutov
2013-10-03 5:00 ` Stefan Monnier
2013-10-04 2:38 ` Dmitry Gutov
2013-10-04 13:52 ` Stefan Monnier
2013-10-05 3:27 ` Dmitry Gutov
2014-12-14 12:31 ` Dmitry Gutov
2014-12-14 14:08 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871u51ll93.fsf@yandex.ru \
--to=dgutov@yandex.ru \
--cc=15294@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.