From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: byte-compiler very slow Date: Sun, 21 Jul 2002 14:15:42 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200207212015.g6LKFgA00958@aztec.santafe.edu> References: <3D39C79B.6020605@dponce.com> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1027282639 29149 127.0.0.1 (21 Jul 2002 20:17:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 21 Jul 2002 20:17:19 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17WN8o-0007a2-00 for ; Sun, 21 Jul 2002 22:17:18 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17WNMJ-0006ch-00 for ; Sun, 21 Jul 2002 22:31:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17WN8c-0003P2-00; Sun, 21 Jul 2002 16:17:06 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17WN7J-0003KN-00; Sun, 21 Jul 2002 16:15:45 -0400 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g6LKFnB22726; Sun, 21 Jul 2002 14:15:49 -0600 (MDT) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g6LKFgA00958; Sun, 21 Jul 2002 14:15:42 -0600 (MDT) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: david@dponce.com, walters@gnu.org In-Reply-To: <3D39C79B.6020605@dponce.com> (message from David Ponce on Sat, 20 Jul 2002 22:27:07 +0200) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5956 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5956 A first quick comparison between the 21.2.1 and latest CVS versions of bytecomp.el codes showed me that the main addition that could impact performance could be related to the new (nice) feature that reports symbol positions on byte-compiler messages. I think this is an extremely nice feature. It is worth some slowdown, byt 5x or 9x seems a bit much. It would be useful to do some profiling on this. Does someeone want to do that? I have a feeling Colin Walters, who added that feature, may be on vacation. Colin, if you are there, could you please speak up? A simple optimization idea occurs to me. The byte compiler could start processing a sexp in the old mode with the location tracking feature turned off. If it encounters any sort of warning or error, it could abort processing of that sexp and restart with the location tracking feature turned on. This would give the same results but all non-erroneous sexps would be processed faster. The only case where this causes a problem would be when macros do very weird things, such as if they their behavior depends on how many times the macro is expanded. Perhaps it is an adequate solution to that problem to say "Don't do that".