A couple of months ago I evaluated gcc vs icc and Portland Group compilers. Everything was done to ensure that each compiler was producing the fastest code possible.

With some code using standard exp/sin/cos (numerical integrals of optics equations) and a lot of collision detection, GCC 4.2.1 really kick icc's ass requiring 80% of the time with icc. Portland Group compilers (PGC at version 7.1) are the king of the hill with an amazing 60% of the time of the GCC code (which makes 48% of the icc time). Please note that this code is quite standard C and pthreaded, which means that I can move it almost anywhere. icc's OpenMP was always slower than simple pthread handling in GCC.

However, I have SSE2 pure code for the most simplistic cases of the equations. In that case, GCC kills everything. Compared to the non-SSE code, the new code runs in only 30% of the original time, which is the double of perfomance compared to PGC with standard C code. By some reason, PGC did not like at all the use of SSE2 intrinsics and is generating a code much slower than the one produced with standard C code. The gain of performance of icc with SSE2 was minimal.

In conclusion, we bought a PGC's license and we use GCC / PGC according to the problem. There are some problems that are too complicated to move to SSE2 code so PGC is a wise investment.

Let's forget about the competition of Intel vs PGC or PathScale, it's a shame for Intel than their compilers struggle so much vs the free-as-beer GCC.

Cheers to GCC team.

PS: The funny detail, all this testing was done in a cluster of Intel processors.