From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Byte compiler inefficiency Date: Mon, 08 Aug 2005 22:43:48 -0400 Message-ID: References: <85acjuhtf0.fsf@lola.goethe.zz> <854qa04o3q.fsf@lola.goethe.zz> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1123556468 32461 80.91.229.2 (9 Aug 2005 03:01:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2005 03:01:08 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 09 05:00:58 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E2KM3-0007hv-Cf for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2005 05:00:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2KP5-0006lV-PI for ged-emacs-devel@m.gmane.org; Mon, 08 Aug 2005 23:03:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E2KM7-0005zH-84 for emacs-devel@gnu.org; Mon, 08 Aug 2005 23:00:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E2KLw-0005uM-7x for emacs-devel@gnu.org; Mon, 08 Aug 2005 23:00:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2KLv-0005pt-UD for emacs-devel@gnu.org; Mon, 08 Aug 2005 23:00:31 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E2KLV-0006Up-7A for emacs-devel@gnu.org; Mon, 08 Aug 2005 23:00:05 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1E2K5k-0008U9-5f; Mon, 08 Aug 2005 22:43:48 -0400 Original-To: David Kastrup In-reply-to: <854qa04o3q.fsf@lola.goethe.zz> (message from David Kastrup on Mon, 08 Aug 2005 14:20:09 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41746 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41746 > When cadr is called interpretively, the binding of x is like any > other binding. Sure, but the binding can't possible have any effect on the result. In the particular case of cadr, it can't, because no non-primitive functions are called. If the compiler could detect this kind of case, it could do the optimization safely. However, if the defsubst calls some non-primitives, they could refer to the variable, so failing to bind it would be unsafe. Implementing the optimization in the former case would be useful, and I will put it in etc/TODO, but it should not be done until after the release.