[Top][All Lists]

[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 <>, Emanuel Berg <> 

> 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 

Barry Margolin,
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

reply via email to

[Prev in Thread] Current Thread [Next in Thread]