Subject: Re: bug#12033: closed (Re: bug#12033: format should be faster)

From: [email-masked] (Ludovic Courtès)
Date: Tue, 21 Aug 2012 15:40:42 +0200

Hi,

Noah Lavine <[email-masked]> skribis:

> What I was hoping to do is have a macro that is also
> identifier-syntax, so if format is used in a way that can't be
> macroexpanded, it falls back to the procedure. I think I've seen an
> example of this before, but I'm not sure where.

Yes, ‘define-inlinable’ does that, for instance.

[...]

> However, I wonder if the partial evaluator would actually solve this
> problem if it knew how to do cross-module inlining. That's another big
> project, but it could be a way to solve this problem and keep format
> as a function.

If ‘format’ were defined with ‘define-inlinable’ (which it cannot
currently, because rest arguments aren’t supported–which should be
fixed), then peval could specialize the ‘format’ code at the call site.
I wonder how far it’d go, though.

Ludo’.