From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Zack Weinberg Newsgroups: gmane.emacs.devel Subject: Re: byte-opt.el addition - optimize list of compile-time constants Date: Wed, 08 Dec 2004 11:45:12 -0800 Message-ID: <87zn0ofubb.fsf@codesourcery.com> References: <87u0qxgn65.fsf@codesourcery.com> <878y88hazn.fsf@codesourcery.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1102535156 26756 80.91.229.6 (8 Dec 2004 19:45:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2004 19:45:56 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 08 20:45:41 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cc7kr-0002dM-00 for ; Wed, 08 Dec 2004 20:45:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc7ui-0006Kw-Kb for ged-emacs-devel@m.gmane.org; Wed, 08 Dec 2004 14:55:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cc7uL-0006BH-H3 for emacs-devel@gnu.org; Wed, 08 Dec 2004 14:55:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cc7uK-0006Av-MS for emacs-devel@gnu.org; Wed, 08 Dec 2004 14:55:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc7uK-0006AZ-8x for emacs-devel@gnu.org; Wed, 08 Dec 2004 14:55:28 -0500 Original-Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Cc7kQ-0004Eb-Re for emacs-devel@gnu.org; Wed, 08 Dec 2004 14:45:15 -0500 Original-Received: (qmail 19990 invoked from network); 8 Dec 2004 19:45:13 -0000 Original-Received: from localhost (HELO taltos.codesourcery.com) (zack@127.0.0.1) by mail.codesourcery.com with SMTP; 8 Dec 2004 19:45:13 -0000 Original-Received: by taltos.codesourcery.com (sSMTP sendmail emulation); Wed, 8 Dec 2004 11:45:12 -0800 Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Wed, 08 Dec 2004 14:27:04 -0500") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) 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: main.gmane.org gmane.emacs.devel:30882 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30882 Stefan Monnier writes: >> I seriously wonder how much would break if this optimization were >> implemented for 'list'. My suspicion is that people don't commonly >> apply 'eq' to lists in the first place. > > Well, try it: > > (put 'list 'byte-optimizer 'byte-optimize-pure-func) > (put 'list* 'byte-optimizer 'byte-optimize-pure-func) > (put 'cons 'byte-optimizer 'byte-optimize-pure-func) > (put 'append 'byte-optimizer 'byte-optimize-pure-func) !! Symbol's function definition is void ((byte-optimize-pure-func)) I guess this is only in CVS Emacs? zw