From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: master 1ecd350 2/2: Evaluate some unnecessarily quoted lambdas
Date: Sun, 21 Jun 2020 19:08:22 +0100 [thread overview]
Message-ID: <87lfkg8f6x.fsf@tcd.ie> (raw)
In-Reply-To: <jwv366oe6q3.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 21 Jun 2020 12:18:50 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> - (lambda-code (byte-compile '(lambda ()))))
>> + (lambda-code (byte-compile (lambda ()))))
>
> I can't believe I'm doing that, but: this hunk is wrong!
>
> `byte-compile` takes source code as input, not values. It does go to
> the trouble of trying to handle the case where we pass it a function
> value that's not yet compiled because it's an important use-case in
> practice,
(Also it's advertised in its docstring.)
> but it's better to avoid it since the above means that we'll
> first turn '(lambda () ()) into a closure object which `byte-compile`
> then has to convert back to something like (lambda () ()).
Ah okay. I admit the main reason I thought the hunk was okay is because
(byte-compile (lambda ())) and (byte-compile '(lambda ())) produce the
same byte-code.
Thanks for catching that, now reverted.
Revert last change in benchmark.el
0792f8e4f0 2020-06-21 19:01:40 +0100
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0792f8e4f0de2328c57d552a5845bdf77265a971
--
Basil
prev parent reply other threads:[~2020-06-21 18:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200621124626.3690.70321@vcs0.savannah.gnu.org>
[not found] ` <20200621124629.C414420A26@vcs0.savannah.gnu.org>
2020-06-21 16:18 ` master 1ecd350 2/2: Evaluate some unnecessarily quoted lambdas Stefan Monnier
2020-06-21 18:08 ` Basil L. Contovounesios [this message]
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=87lfkg8f6x.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.