bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11657: 24.1.50; Byte compiler is a lot slower now, when run interpre


From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]