News for hackers. Stuff that matters.
Re:On the Madness of Optimizing Compilers by dkopi on Tuesday March 08, 2016 @03:10AM (#11244061)
Languages and compilers actually do have constructs for programmers to make things easier for the compiler.

"inline" and "register" are two very known examples. Other examples are function attributes in gcc: https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

Re:On the Madness of Optimizing Compilers by nkurz on Tuesday March 08, 2016 @03:48AM (#11244160)
I presume you're aware that you've chosen two controversial examples? "register" has been formally deprecated in C++, and has been ignored by (almost?) all C compilers for decades: http://stackoverflow.com/questions/20618008/replacement-for-...

And most current wisdom is that "inline" no longer serves as a useful performance suggestion to the compiler, but instead should only be used as a linkage directive to allow multiple declarations of the same function: http://stackoverflow.com/questions/29796264/is-there-still-a...

Re:On the Madness of Optimizing Compilers by dkopi on Tuesday March 08, 2016 @04:01AM (#11244208)
Great points. As compilers evolve, optimizers are even more knowledgeable of what should be put in a register or inline that the programmer.

But those are still 2 well known features that were added intentionally to help improve performance.

Re:On the Madness of Optimizing Compilers by 0x07c0 on Tuesday March 08, 2016 @06:14AM (#11244642)
restrict is probably a better example! https://en.wikipedia.org/wiki/Restrict
Re:On the Madness of Optimizing Compilers by dkopi on Tuesday March 08, 2016 @07:51AM (#11244895)
great example