unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Richard M. Stallman" <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Byte compiler inefficiency
Date: Mon, 08 Aug 2005 22:43:48 -0400	[thread overview]
Message-ID: <E1E2K5k-0008U9-5f@fencepost.gnu.org> (raw)
In-Reply-To: <854qa04o3q.fsf@lola.goethe.zz> (message from David Kastrup on Mon, 08 Aug 2005 14:20:09 +0200)

    > When cadr is called interpretively, the binding of x is like any
    > other binding.

    Sure, but the binding can't possible have any effect on the result.

In the particular case of cadr, it can't, because no non-primitive
functions are called.  If the compiler could detect this kind of case,
it could do the optimization safely.

However, if the defsubst calls some non-primitives, they could refer
to the variable, so failing to bind it would be unsafe.

Implementing the optimization in the former case would be useful,
and I will put it in etc/TODO, but it should not be done until
after the release.

  reply	other threads:[~2005-08-09  2:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-07 11:34 Byte compiler inefficiency David Kastrup
2005-08-08 12:09 ` Richard M. Stallman
2005-08-08 12:20   ` David Kastrup
2005-08-09  2:43     ` Richard M. Stallman [this message]
2005-08-09  7:06       ` David Kastrup
2005-08-10  0:16 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=E1E2K5k-0008U9-5f@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).