From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: byte-opt.el addition - optimize list of compile-time constants Date: Thu, 09 Dec 2004 11:34:13 +0100 Message-ID: References: <87u0qxgn65.fsf@codesourcery.com> <878y88hazn.fsf@codesourcery.com> <200412082133.12630.pogonyshev@gmx.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1102588587 16779 80.91.229.6 (9 Dec 2004 10:36:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2004 10:36:27 +0000 (UTC) Cc: Zack Weinberg , Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 09 11:36:16 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 1CcLeh-00028o-00 for ; Thu, 09 Dec 2004 11:36:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CcLoa-0002Jy-QD for ged-emacs-devel@m.gmane.org; Thu, 09 Dec 2004 05:46:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CcLmz-0002Cy-S2 for emacs-devel@gnu.org; Thu, 09 Dec 2004 05:44:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CcLmy-0002Cf-TY for emacs-devel@gnu.org; Thu, 09 Dec 2004 05:44:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CcLmy-0002Cc-D2 for emacs-devel@gnu.org; Thu, 09 Dec 2004 05:44:48 -0500 Original-Received: from [195.135.220.2] (helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CcLcm-0003eU-9n for emacs-devel@gnu.org; Thu, 09 Dec 2004 05:34:16 -0500 Original-Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 46BA711ECBE8; Thu, 9 Dec 2004 11:34:14 +0100 (CET) Original-To: Paul Pogonyshev X-Yow: Used staples are good with SOY SAUCE! In-Reply-To: <200412082133.12630.pogonyshev@gmx.net> (Paul Pogonyshev's message of "Wed, 8 Dec 2004 21:33:12 +0200") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (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:30933 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30933 Paul Pogonyshev writes: > Zack Weinberg wrote: >> 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. > > You are very wrong here. While it will hardly break sane code, > `eq' is _very_ often applied to cons cells, e.g. lists. Also 'list' is sometimes intentionally used to create a new cons that can be changed by side effect. If it were optimized to a constant the side effect would now change a literal. Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."