Obviously this is due to how complex it is to make correct heuristics regarding those more advanced optimizations. This can be rectified by using PGO (profile-guided optimization) where the compiler gathers all necessary runtime data during an initial run which is then used to correctly determine when and when not to use certain optimizations in order to maximize performance.
When using PGO I've never encountered a situation where -O3 hasn't beaten -O2, the downside of course is that compilation becomes more complex since you need to perform a information gathering execution of the code in between two compiles.
For who is wondering about the compiler deathmatch.. here it is: http://phoronix.com/forums/showthrea...339#post175339
From some months ago but the compiler world doesn't move that fast so the results are probably still valid.
Note the interesting thing in C-Ray. They seem to stay the same with every compiler in that deathmatch! Now if you look at that "Drindl" from this thread you see that C-Ray performs WAY better so, that "Drindl" thing must be doing something magic to perform so much better.
Interesting speculation in here
Last edited by markg85; 06-10-2011 at 03:35 PM.
Well, I think that since michael is comparing dirndl to ubuntu, it is something that goes inside the kernel or the os in general. Maybe I'm wrong, but it's the only hint I can guess from the article.