To view parent comment, click here.
To read all comments associated with this story, please click here.
moondevil,
"Actually when I think about optimizing compilers, I am thinking about Portland Group, Intel and Codeplay compilers."
Intel's is the only one I've used, but that might have been five years ago. The other two don't offer versions for the public. Codeplay's website seems to indicate they specialize with game accelloration on cuda and PS3.
"I don't do any low level programming myself since around 2000, so in a way I am also curious how the reality is."
I wish i could say I did it professionally, but I don't. I just do it for my own pet projects. Not long I managed to beat the GMP arbitrary size arithmatic library on divisions for lengths of around 4 words. I was a bit surprised since my algorithm is straitforward (though it did require inline assembly optimization). I want to confirm that my results are valid in the general case on multiple machines. Also I need to confirm that GMP was in fact using it's fastest algorithm; GMP does automatically choose between many of them so maybe the selector was poorly tuned.
It would be very interesting to see whether the assembly optimizations could be eliminated under ICC, maybe I'll give it a shot. This is all on the back burner now since I only get paid to do web stuff.
This reminds me - 80+% of drivers think they are above average, too ;P
sometimes the compiler "cheats" - like when Intel compiler turned off optimisations on non-Intel CPUs (a bunch of links: http://www.hydrogenaudio.org/forums/index.php?showtopic=77523 ...seems Intel is at it again with AVX)
zima,
"This reminds me - 80+% of drivers think they are above average, too ;P"
Haha. Wikipedia has an article on the phenomenon:
http://en.wikipedia.org/wiki/Illusory_superiority
I found this interesting:
"One of the main effects of illusory superiority in IQ is the Downing effect. This describes the tendency of people with a below average IQ to overestimate their IQ, and of people with an above average IQ to underestimate their IQ"
Here's someone else's take:
http://agoraphilia.blogspot.com/2007/01/more-than-50-percent-can-be...
"sometimes the compiler 'cheats' - like when Intel compiler turned off optimisations on non-Intel CPUs.."
I remember them being sued over it, it's definitely a very sneaky thing for intel to do.
Edited 2013-02-19 21:09 UTC





Member since:
2011-01-28
moondevil,
"As I said it all depends how complex it is the processor you are trying to target."
I hear that, but most compilers don't attempt to optimize for all the things your talking about and they still need your help with setting the right flags and runtime profiling when they do. Some of them are still doing a bad job, for example we tested GCC's SIMD vectorization last year and it did not do a great job of it. It would be neat to try that again and see if it's improved. But all too often people simply assume that compiler output is optimal without even doing any benchmarks. While this might be just fine for their purposes, it's most definitely wrong to make assertions about it since they're not the people who know much about optimizing in the first place.
At times I'm able to beat GCC's output, I'd rate my skill as above average but you'd be right if you said that it's usually too much work for too little gain. It's not usually worthwhile especially when non-portable code is the result.