Subject: bug#11935: XINT etc. should be functions

From: Paul Eggert <[email-masked]>
Date: Mon, 16 Jul 2012 07:54:07 -0700

On 07/15/2012 03:06 PM, Stefan Monnier wrote:
> I always run with -O0 (plus ENABLE_CHECKING, and to add insult to
> injury, on Atom-level platforms), so I'd appreciate if you could ensure
> those functions are inlined even in -O0.

That's easy enough to arrange, without being intrusive --
it would add maybe 10 lines to the patch.

Although the benchmark numbers are a bit scary, they greatly
exaggerate the real-life performance effect,
because most of Emacs's CPU time is spent elsewhere.
I just now ran Emacs with the patch compiled with -g -O0,
on my main laptop, which is also quite limited and slow
(Pentium M 1.86 GHz, circa 2005), and interactive performance
was fine.  Your mileage may vary, of course, but it might
make sense to not inline those functions even with -O0.
There are important advantages to not inlining: you can put
breakpoints on them, for example.  So it might make sense to
inline them only as an option.