all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Markus Triska <markus.triska@gmx.at>
Cc: lekktu@gmail.com, emacs-devel@gnu.org, rms@gnu.org,
	Miles Bader <miles@gnu.org>
Subject: Re: weird desktop.el change
Date: Fri, 13 Apr 2007 15:20:11 -0400	[thread overview]
Message-ID: <jwvhcrkxewl.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87wt0g2oog.fsf@gmx.at> (Markus Triska's message of "Fri\, 13 Apr 2007 19\:02\:07 +0200")

>> 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  <markus.triska@gmx.at>

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

  reply	other threads:[~2007-04-13 19:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11  0:05 weird desktop.el change Miles Bader
2007-04-11  0:49 ` Juanma Barranquero
2007-04-11  1:25   ` Miles Bader
2007-04-11  1:58     ` Chong Yidong
2007-04-11 15:47     ` Stephen J. Turnbull
2007-04-11 19:46     ` Richard Matthew Stallman
2007-04-11 23:22       ` Miles Bader
2007-04-13 17:02         ` Markus Triska
2007-04-13 19:20           ` Stefan Monnier [this message]
2007-04-13 19:32             ` Markus Triska
2007-04-14  3:45             ` Richard Stallman
2007-04-15  2:36               ` Markus Triska
2007-04-15 19:01                 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvhcrkxewl.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=markus.triska@gmx.at \
    --cc=miles@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.