Anyone here has benchmarked Intel C++ compiler and GCC? Anyone here has benchmarked Intel C++ compiler and GCC? linux linux

Anyone here has benchmarked Intel C++ compiler and GCC?


There is an interesting PDF here which compares a number of compilers.


I hope this helps more than hurts :)

I did a little compiler shootout sometime over a year ago, and I am going off memory.

  1. GCC 4.2 (Apple)
  2. Intel 10
  3. GCC 4.2 (Apple) + LLVM

I tested multiple template heavy audio signal processing programs that I'd written.

Compilation times: The Intel compiler was by far the slowest compiler - more than '2x times slower' as another posted cited.

GCC handled deep templates very well in comparison to Intel.

The Intel compiler generated huge object files.

GCC+LLVM yielded the smallest binary.

The generated code may have significant variance due to the program's construction, and where SIMD could be used.

For the way I write, I found that GCC + LLVM generated the best code. For programs which I'd written before I took optimization seriously (as I wrote), Intel was generally better.

Intel's results varied; it handled some programs far better, and some programs far worse. It handled raw processing very well, but I give GCC+LLVM the cake because when put into the context of a larger (normal) program... it did better.

Intel won for out of the box, number crunching on huge data sets.

GCC alone generated the slowest code, though it can be as fast with measurement and nano-optimizations. I prefer to avoid those because the wind may change direction with the next compiler release, so to speak.

I never measured poorly written programs in this test (i.e. results outperformed distributions of popular performance libraries).

Finally, the programs were written over several years, using GCC as the primary compiler in that time.

Update: I was also enabling optimizations/extensions for Core2Duo. The programs were clean enough to enable strict aliasing.


The MySQL team posted once that icc gave them about a 10% performanct boost over gcc. I'll try to find the link.

In general I've found that the 'native' compilers perform better than gcc on their respective platforms

edit: I was a little off. Typical gains were 20-30% not 10%. Some narrow edge cases got a doubling of performance. http://www.mysqlperformanceblog.com/files/presentations/LinuxWorld2004-Intel.pdf