[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird desktop.el change

From: Stefan Monnier
Subject: Re: weird desktop.el change
Date: Fri, 13 Apr 2007 15:20:11 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux)

>> 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  <address@hidden>

>       * 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.


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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]