[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".
- Re: Inlining doesn't happen on OS X: big performance problem, (continued)
- Re: Inlining doesn't happen on OS X: big performance problem, Ryan Johnson, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem, Andreas Schwab, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem, Daniel Colascione, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem, Andreas Schwab, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem, Daniel Colascione, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem, Andreas Schwab, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem,
Óscar Fuentes <=
- Re: Inlining doesn't happen on OS X: big performance problem, Paul Eggert, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem, Ryan Johnson, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem, Paul Eggert, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem, Ryan Johnson, 2013/09/19
- Re: Inlining doesn't happen on OS X: big performance problem, Jan Djärv, 2013/09/20
- Re: Inlining doesn't happen on OS X: big performance problem, Dmitry Antipov, 2013/09/20
- Re: Inlining doesn't happen on OS X: big performance problem, Stefan Monnier, 2013/09/20
- Re: Inlining doesn't happen on OS X: big performance problem, Paul Eggert, 2013/09/20