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#15294: 24.3.50; js2-mode parser is several times slower in lexical-binding mode Date: Wed, 18 Sep 2013 19:48:48 -0400 Message-ID: References: <871u51ll93.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1379563941 31464 80.91.229.3 (19 Sep 2013 04:12:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Sep 2013 04:12:21 +0000 (UTC) Cc: 15294@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 19 06:12:23 2013 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 1VMVbJ-0002vt-Dg for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Sep 2013 06:12:21 +0200 Original-Received: from localhost ([::1]:49561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMVbI-000885-Ip for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Sep 2013 00:12:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMVb7-00087u-Ur for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2013 00:12:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMVb0-00063t-KO for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2013 00:12:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMVb0-00062x-GE for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2013 00:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VMVb0-00026U-1s for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2013 00:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2013 04:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15294 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15294-submit@debbugs.gnu.org id=B15294.13795638898043 (code B ref 15294); Thu, 19 Sep 2013 04:12:01 +0000 Original-Received: (at 15294) by debbugs.gnu.org; 19 Sep 2013 04:11:29 +0000 Original-Received: from localhost ([127.0.0.1]:47999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMVaT-00025f-3d for submit@debbugs.gnu.org; Thu, 19 Sep 2013 00:11:29 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:34995) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMVaS-00025X-1J for 15294@debbugs.gnu.org; Thu, 19 Sep 2013 00:11:28 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r8J4BPBU001244; Thu, 19 Sep 2013 00:11:25 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id E237466168; Wed, 18 Sep 2013 19:48:48 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Mon, 09 Sep 2013 22:04:38 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4705=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4705> : inlines <94> : streams <1040348> : uri <1541021> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:78552 Archived-At: 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 Of course, code compiled with the new bytecodes won't run on non-bleeding edge Emacs. On my "standard test" (i.e. time to recompile all the emacs/lisp files), the new bytecodes make no measurable difference, so `catch' doesn't seem to be used very much there. 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. Stefan