From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83pq98u3h8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1339291542 17400 80.91.229.3 (10 Jun 2012 01:25:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 10 Jun 2012 01:25:42 +0000 (UTC) Cc: 11657@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 10 03:25:40 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SdWuS-0002OH-Fa for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jun 2012 03:25:40 +0200 Original-Received: from localhost ([::1]:39251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdWuS-0007ut-9X for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jun 2012 21:25:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdWuO-0007uX-N3 for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2012 21:25:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SdWuM-0004dW-V5 for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2012 21:25:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdWuM-0004dS-Qc for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2012 21:25:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SdWwj-0005Gv-Sn for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2012 21:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jun 2012 01:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11657 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11657-submit@debbugs.gnu.org id=B11657.133929163620210 (code B ref 11657); Sun, 10 Jun 2012 01:28:01 +0000 Original-Received: (at 11657) by debbugs.gnu.org; 10 Jun 2012 01:27:16 +0000 Original-Received: from localhost ([127.0.0.1]:36337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SdWvy-0005Fu-BM for submit@debbugs.gnu.org; Sat, 09 Jun 2012 21:27:16 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:47099) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SdWvx-0005Fn-Az for 11657@debbugs.gnu.org; Sat, 09 Jun 2012 21:27:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxIfQ/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="190867350" Original-Received: from 69-196-135-208.dsl.teksavvy.com (HELO pastel.home) ([69.196.135.208]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 09 Jun 2012 21:24:44 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5BEEC58F22; Sat, 9 Jun 2012 21:24:43 -0400 (EDT) In-Reply-To: <83pq98u3h8.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Jun 2012 14:30:43 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60826 Archived-At: > 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