From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 11657@debbugs.gnu.org
Subject: bug#11657: 24.1.50; Byte compiler is a lot slower now, when run interpreted
Date: Sat, 09 Jun 2012 21:24:43 -0400 [thread overview]
Message-ID: <jwvpq98c6o8.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83pq98u3h8.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Jun 2012 14:30:43 +0300")
> The byte compiler seems to be a lot slower now, when run interpreted,
> compared with how it was a couple of weeks ago. With the current
> trunk:
Before revno 108533, I wouldn't have been surprised, but after that I do
not know what could cause such a significant slowdown.
> Is this slowdown expected? Can it be fixed?
It is expected that the byte-compiler is significantly slower when
interpreted, especially because of liberal use of macros and the
inefficient way macros are re-expanded when interpreted, but an 8-times
slowdown compared to the old interpreted code is definitely
not expected.
One potential source of slowness is the use of `pcase' in macroexp.el:
when byte-compiled, this is not a problem since it's all macroexpanded
away into reasonably efficient code. But when interpreted, the `pcase'
macro might get re-expanded over and over, and it's a macro that's
costly to expand (because it has to work fairly hard in order to get
this reasonably efficient code). pcase.el uses a hash-table to memoize
the recent expansions, but if for some reason this memoization fails and
the pcase macro gets re-expanded all the time, then an 8-fold slowdown
would not surprise me.
Stefan
next prev parent reply other threads:[~2012-06-10 1:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-09 11:30 bug#11657: 24.1.50; Byte compiler is a lot slower now, when run interpreted Eli Zaretskii
2012-06-09 20:07 ` Juanma Barranquero
2012-06-09 23:36 ` Christoph Scholtes
2012-06-10 1:24 ` Stefan Monnier [this message]
2012-06-10 3:00 ` Eli Zaretskii
2012-06-10 14:48 ` Stefan Monnier
2012-06-11 1:10 ` Stefan Monnier
2012-06-11 16:53 ` Eli Zaretskii
2012-06-14 19:09 ` Stefan Monnier
2012-06-14 23:56 ` Juanma Barranquero
2012-06-15 1:41 ` Stefan Monnier
2012-06-15 9:27 ` Eli Zaretskii
2012-06-15 19:43 ` Juanma Barranquero
2012-06-15 20:04 ` Eli Zaretskii
2012-06-20 16:33 ` Stefan Monnier
2012-06-20 23:02 ` Juanma Barranquero
2012-06-22 18:33 ` Eli Zaretskii
2012-06-25 1:02 ` Glenn Morris
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvpq98c6o8.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=11657@debbugs.gnu.org \
--cc=eliz@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).