GNU bug report logs -
#52147
Eager macro-expansion is not performed in `eval-and-compile' functions
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
That's what the subject says. I know that it works regardless, but the
performance suffers, especially if the used macros are complex.
Paul
On Sun, 28 Nov 2021 at 11:30, Michael Heerdegen <michael_heerdegen <at> web.de>
wrote:
> Hello Paul,
>
> > (eval-and-compile
> > (defun my-func-eac (what)
> > (my-macro what)))
> >
> > (defun my-func-normal (what)
> > (my-macro what))
> >
> > (print (symbol-function 'my-func-eac))
> > (print (symbol-function 'my-func-normal))
> >
> > `eval-and-compile' is advertised in Elisp manual to make
> > byte-compilation of certain macros without prior loading
> > possible. Looks strange that at the same time it can worsen
> > performance of non-byte-compiled code.
>
> Is the issue you want to draw attention to that an interpreted
> `eval-and-compile' form doesn't macroexpand its body?
>
> Michael.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 3 years and 145 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.