* 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
[parent not found: <mailman.1675.1175530252.7795.help-gnu-emacs@gnu.org>]
* 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).