[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optimising Elisp code
From: |
tomas |
Subject: |
Re: Optimising Elisp code |
Date: |
Sat, 6 Oct 2018 21:24:57 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Oct 06, 2018 at 06:55:54PM +0200, Garreau, Alexandre wrote:
> On 2018-10-06 at 10:40, Stefan Monnier wrote:
> >> 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...
>
> Why “undo”? [...]
because...
- when debugging, you want to know that function "foo" is being
called
- you want, perhaps, to advice/instrument the function after its
entrails have been spread across some other byte code
- because you expect it to be possible to redefine the function
at run time (the run time system would have to know how to
excise the inlined and perhaps optimised bits and pieces and
replace them by something else)
> Or would “reevaluate every function that where defined with the
> (now-redefined) inlined function inside” work too?
Hmm. Not reevaluate, but recompile, and not "inside", but rather
"outside" -- like finding all places where this function was
inlined and do some magic there. Perhaps doable, but not trivial.
Cheers
-- t
signature.asc
Description: Digital signature
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, 2018/10/06
- Re: Optimising Elisp code, Garreau, Alexandre, 2018/10/06
- Re: Optimising Elisp code,
tomas <=
- 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
Message not availableRe: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/07
Re: Optimising Elisp code [again], Garreau, Alexandre, 2018/10/07