emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inlining doesn't happen on OS X: big performance problem


From: Óscar Fuentes
Subject: Re: Inlining doesn't happen on OS X: big performance problem
Date: Thu, 19 Sep 2013 23:19:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Daniel Colascione <address@hidden> writes:

>>>> Why doesn't the compiler inline static functions by itself?
>>>
>>> Why should it?
>> 
>> There is no reason not to do it.
>
> Sure there is: programs would be huge if compilers naively treated every
> "static" as "inline, so they don't. Instead, compilers inline some
> static functions, some of the time, and the heuristics they use for
> deciding whether to do that are inscrutable and variable. Why should we
> rely on these heuristics for good performance when we just write "static
> inline" and make the decision ourselves?

The days when the programmer knew better than the compiler about
micro-optimization are long gone, even more so on cross-platform code.

[snip]

>>> Why should we remove this hint?
>> 
>> "Hint" is the essential hint.
>
> What's wrong with leaving hints in the code? We still have "register"
> all over the place, and "static inline" does much more than "register".

Nowadays "register" is as meaningless as "inline".




reply via email to

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