On 12/30/2011 12:16 AM, Vladimir Panteleev wrote:
I agree, but this wasn't as much about heuristics, but compiler capabilities (e.g. inlining assembler functions).
Adding a keyword won't fix the current problem that the compiler won't inline inline assembler functions. It's an orthogonal issue.
I know there are features on various C compilers to force inlining, I know there's a demand for them.
But I've also, over the years, spent thousands and thousands of hours optimizing the hell out of things, so I have some experience with it.
Once the compiler gets past a certain level of heuristic inlining decisions, forcing it to inline more is just chasing rainbows.
And if one really wants to force an inline, one can do things like the C memcpy using the preprocessor, or string mixins in D, or even cut&paste. If you need to do that in more than a couple places in the code, something else is wrong (that old saw about only a tiny percentage of the code being a bottleneck is true).
Also, if you are tweaking at such a level, every compiler is different enough that your tweaks are likely to be counterproductive on another compiler. Having a portable syntax for such tweaking is not going to help.