[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Knowing where a function has been used (bis) [Was: Re: Optimising El
From: |
Barry Margolin |
Subject: |
Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code] |
Date: |
Sun, 07 Oct 2018 15:35:33 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <86d0slrb4h.fsf@zoho.com>, Emanuel Berg <moasen@zoho.com>
wrote:
> Stefan Monnier wrote:
>
> > Try M-x disassemble RET add-it RET
> > to see how the two calls where compiled.
>
> Next question (first was the number of machine
> instructions vs. call overhead), next question:
> I have 479 `defun's in my Elisp, any general
> pointers as how to determine which of those
> I should consider inlining?
Only worry about the really small ones, less than 5 lines in the body.
The more time spent in the function itself, the less significant the
calling overhead is.
And as another answer said, you should only bother with functions that
are called very frequently. You're only saving a few milliseconds per
call, so if you only call the function once an hour the savings is
insignificant.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
- Re: Optimising Elisp code [again], (continued)
- Re: Optimising Elisp code [again], Garreau, Alexandre, 2018/10/09
- Message not available
- Re: Optimising Elisp code [again], Emanuel Berg, 2018/10/09
- Re: Optimising Elisp code [again], Garreau, Alexandre, 2018/10/09
- Re: Optimising Elisp code [again], Barry Margolin, 2018/10/10
- Re: Optimising Elisp code [again], Óscar Fuentes, 2018/10/10
- Re: Optimising Elisp code [again], Garreau, Alexandre, 2018/10/10
- Message not available
- Re: Optimising Elisp code [again], Emanuel Berg, 2018/10/11
- Re: Optimising Elisp code [again], Robert Thorpe, 2018/10/12
- Message not available
- Re: 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], Garreau, Alexandre, 2018/10/07
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code],
Barry Margolin <=
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/08
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Garreau, Alexandre, 2018/10/08
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/08
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Barry Margolin, 2018/10/08
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/09
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Barry Margolin, 2018/10/10
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/10
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Barry Margolin, 2018/10/11
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/11
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Barry Margolin, 2018/10/12