From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: weird desktop.el change Date: Fri, 13 Apr 2007 15:20:11 -0400 Message-ID: References: <87d52bbwro.fsf@catnip.gol.com> <878xcycx95.fsf@catnip.gol.com> <87wt0g2oog.fsf@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1176492029 6145 80.91.229.12 (13 Apr 2007 19:20:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Apr 2007 19:20:29 +0000 (UTC) Cc: lekktu@gmail.com, emacs-devel@gnu.org, rms@gnu.org, Miles Bader To: Markus Triska Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 13 21:20:27 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HcRJq-0007b6-Ox for ged-emacs-devel@m.gmane.org; Fri, 13 Apr 2007 21:20:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HcRO9-00061T-8B for ged-emacs-devel@m.gmane.org; Fri, 13 Apr 2007 15:24:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HcRO6-000602-7l for emacs-devel@gnu.org; Fri, 13 Apr 2007 15:24:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HcRO5-0005zJ-S2 for emacs-devel@gnu.org; Fri, 13 Apr 2007 15:24:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HcRO5-0005zG-Jz for emacs-devel@gnu.org; Fri, 13 Apr 2007 15:24:49 -0400 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HcRJk-0005uk-78; Fri, 13 Apr 2007 15:20:21 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 7B3F52CF32B; Fri, 13 Apr 2007 15:20:18 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id DEF4E3FE0; Fri, 13 Apr 2007 15:20:11 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id C53346CAB5; Fri, 13 Apr 2007 15:20:11 -0400 (EDT) In-Reply-To: <87wt0g2oog.fsf@gmx.at> (Markus Triska's message of "Fri\, 13 Apr 2007 19\:02\:07 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: Linux 2.6 (newer, 3) 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:69409 Archived-At: >> The process of substituting "mapc" for "mapcar" when the result >> isn't used is not only a hugely widespread tweak in the lisp >> community (a "no brainer" as you might call it), indeed it's an >> obvious optimization for even a very stupid lisp compiler... > Available with this patch: > 2007-04-13 Markus Triska > * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): rewrite > `mapcar' to `mapc' when called for effect Please, let's not add this before the release. Stefan PS: I'm not even sure it's a good optimization: in 99% of the cases it would be better to educate the programmer about mapc by emitting a warning, and in 99% of those cases, it'd be even better to replace the mapc(ar) by a dolist loop.