From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#15294: 24.3.50; js2-mode parser is several times slower in lexical-binding mode Date: Thu, 12 Sep 2013 20:59:52 -0700 (PDT) Message-ID: <0b29ebee-8ed4-47e2-816b-910a013a0898@default> References: <871u51ll93.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1379044893 20378 80.91.229.3 (13 Sep 2013 04:01:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Sep 2013 04:01:33 +0000 (UTC) Cc: 15294@debbugs.gnu.org To: Stefan Monnier , Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 13 06:01:34 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 1VKKZP-0002Ag-D7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Sep 2013 06:01:23 +0200 Original-Received: from localhost ([::1]:44647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKKZO-0006qs-SM for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Sep 2013 00:01:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKKZE-0006pq-8O for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2013 00:01:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKKZ4-0005pV-K5 for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2013 00:01:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKKZ4-0005pR-Gm for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2013 00:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VKKZ3-0007lp-UI for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2013 00:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2013 04:01: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.137904481026204 (code B ref 15294); Fri, 13 Sep 2013 04:01:01 +0000 Original-Received: (at 15294) by debbugs.gnu.org; 13 Sep 2013 04:00:10 +0000 Original-Received: from localhost ([127.0.0.1]:60387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKKYC-0006nO-HM for submit@debbugs.gnu.org; Fri, 13 Sep 2013 00:00:09 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:32351) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKKY5-0006jL-Ik for 15294@debbugs.gnu.org; Fri, 13 Sep 2013 00:00:03 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r8D3xsTQ016876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Sep 2013 03:59:55 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r8D3xrb1009229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Sep 2013 03:59:53 GMT Original-Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r8D3xqK0010499; Fri, 13 Sep 2013 03:59:52 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] 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:78312 Archived-At: > It seems the slowdown is indeed linked to the way `catch' is handled > (indeed, this non-idiomatic ELisp code ends up byte-compiled in a really > poor way). The trivial patch below brings the time down from 5s to 2.6s > (as compared to 2.1s for the dynamic-binding version). > > - (let (c c1 identifier-start is-unicode-escape-start > - contains-escape escape-val str result base > - is-integer quote-char val look-for-slash continue) > - (catch 'return > + (catch 'return > + (let (c c1 identifier-start is-unicode-escape-start > + contains-escape escape-val str result base > + is-integer quote-char val look-for-slash continue) Not really following this thread, but this caught my eye. Is this something that should be mentioned as a guideline in the manual? Or is the byte compiler likely to be improved in this regard, so users need not be aware of it and take measures manually?