Intel, GNU and compiler benchmarking
In the film Revolution OS ( http://uk.imdb.com/title/tt0308808/ - good film btw)) one of the people being interviewed states that after he ported the GNU C compiler to a novel (not the company!) platform, it performed that much better than the compiler released by the people who made the platform. I can't remember who it was or what the platform is.
Speed, fair enough. Maybe the intel compiler does it faster, great.
The Intel compilers has some optimizations, the Visual C++ is pretty competitive. I don't think the GNU compiler generates code running an order slower though, considering how many x86 people uses it, it's pretty optimized given the situation.
Li-fan Chen, I think that it actually is about an order of magnitude slower at least, from the slides I saw. Stroustrup gave a talk here at my work a few weeks ago, and had some slides comparing code compiled with the GNU compiler, equivalant FORTRAN, and the SGI or intel compiler (can't remember which, and couldn't find the slides online just now).
GNU is probably not optimized to take full advantage of the latest instruction set for the Pentium III/IVs the way that Intel's and possible VC++'s compilers would be. In other words, if you're doing something that's heavy on floating point math, vector and matrix operations, you will probably get a lot of benefit from a professional compiler.
We tested Intel's C++ compiler vs GCC on our x86 software (image processing). The Intel binary ran about 10% faster. We didn't play around with all of the fancy optimization options though.
We tested Intel's C++ compiler vs MSVC++ on some of our x86 software (image processing: integer and bit arithmetic, not floating point). The Intel binary ran about 10% faster.
In the fev issue of C/C++ Users Journal there is an article by Moshe Bar comparing speed of the Linux kernel compiled with GCC and the Intel compiler for some tasks.
I had a dream last night comparing Intel compiler with GCC, and the dream came out 10% faster...
Of course it's worth remembering that the Intel compiler primarily optimizes for Intel processors -- it may reorganize instructions to work perfectly in the P4 pipeline, but this might be detrimental on an Athlon, for instance.
Fog Creek Home