[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optimising Elisp code
From: |
Stefan Monnier |
Subject: |
Re: Optimising Elisp code |
Date: |
Sat, 06 Oct 2018 10:40:18 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> What you're describing is called inline expansion.
> AFAIK, the Elisp compiler doesn't do this automatically.
Indeed, it doesn't do it automatically because it doesn't know how to
(automatically) undo it, and it has visible effects w.r.t advice,
debug-on-entry, etc...
> You can define bar as a macro -- those HAVE to be expanded at compile
> time, since that's how they work.
>
> You can also define an inline function using defsubst. From the Elisp
> manual:
And also with cl-defsubst, with (declare (compiler-macro ...))
and more recently with define-inline.
Stefan
- Re: Optimising Elisp code, (continued)
- Re: Optimising Elisp code, Stefan Monnier, 2018/10/05
- Message not available
- Re: Optimising Elisp code, Emanuel Berg, 2018/10/05
- Re: Optimising Elisp code, James K. Lowden, 2018/10/05
- Re: Optimising Elisp code, Emanuel Berg, 2018/10/05
- Re: Optimising Elisp code, Barry Margolin, 2018/10/06
Knowing where a function has been used (e.g. for optimizing) [Was: Re: Optimising Elisp code], Garreau, Alexandre, 2018/10/06
Re: Optimising Elisp code,
Stefan Monnier <=
- Re: Optimising Elisp code, Garreau, Alexandre, 2018/10/06
- Re: Optimising Elisp code, tomas, 2018/10/06
- Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Garreau, Alexandre, 2018/10/06
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], tomas, 2018/10/06
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Garreau, Alexandre, 2018/10/06
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], tomas, 2018/10/07
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Garreau, Alexandre, 2018/10/07
Message not availableRe: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/07
Message not availableRe: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/07
Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Stefan Monnier, 2018/10/07