From: lloda <lloda@sarc.name>
To: 61660@debbugs.gnu.org
Subject: bug#61660: [feature request] optimization of case-lambda
Date: Mon, 20 Feb 2023 18:56:25 +0100 [thread overview]
Message-ID: <8EDEC1EC-EC48-474D-88A0-9CE25436A961@sarc.name> (raw)
On 3.0.9
> ,optimize ((case-lambda (() 0)))
= 0
but
> ,optimize ((case-lambda (() 0) ((a) 1)))
= ((case-lambda (() 0) ((a) 1)))
The problem with this is that when the output of a macro contains case-lambda, recursive application results in geometrical increase of code size. It seems that it should be possible to resolve the application on the spot; at last to reduce the case-lambda to a simple lambda when the arity is available (which now only happens when the case-lambda contains a single clause).
Thanks
Daniel
next reply other threads:[~2023-02-20 17:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 17:56 lloda [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-01-20 19:16 bug#60971: build failure of v3.0.9rc1 on mac os 12.6 lloda
[not found] ` <handler.60971.B.167424218722695.ack@debbugs.gnu.org>
2023-02-23 19:00 ` bug#61660: [feature request] optimization of case-lambda lloda
2023-02-24 17:26 ` lloda
2023-02-27 10:11 ` Ludovic Courtès
2023-02-27 17:19 ` lloda
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/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8EDEC1EC-EC48-474D-88A0-9CE25436A961@sarc.name \
--to=lloda@sarc.name \
--cc=61660@debbugs.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.
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).