* When to choose defsubst
@ 2007-03-31 15:03 Xavier Maillard
0 siblings, 0 replies; 2+ messages in thread
From: Xavier Maillard @ 2007-03-31 15:03 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I tried to find an easy answer but failed miserably at it :/
So my question is this: when/why should I use a defsubst ?
Xavier
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: When to choose defsubst
[not found] <mailman.1675.1175530252.7795.help-gnu-emacs@gnu.org>
@ 2007-04-02 17:31 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2007-04-02 17:31 UTC (permalink / raw)
To: help-gnu-emacs
> I tried to find an easy answer but failed miserably at it :/
> So my question is this: when/why should I use a defsubst ?
Never.
Stefan
PS: `defsubst' is like `defun' except it additionally tells the
byte-compiler that this function should be inlined at every call site.
In some rare cases, it can make a noticeable performance difference,
but these are very rare, so you should only do that after noticing an
actual performance problem and finding out where time is spent (with
elp, typically).
The reason not to use `defsubst' is that it does not behave well w.r.t
debug/advice/trace/...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-02 17:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-31 15:03 When to choose defsubst Xavier Maillard
[not found] <mailman.1675.1175530252.7795.help-gnu-emacs@gnu.org>
2007-04-02 17:31 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.