Sun Studio 11 compiler *CRUSHED* GCC 4 on x86/x64.
It generated far shorter and better optimized code.
Interestingly enough, Visual Studio C compiler had the tightest code of all.
BTW, to test, just compile with -S and you'll get assembler source out. Then
you can look at it and compare side
Could be interesting to see a compiler shootout between:
SUN Studio 11, gcc3.4, gcc4.02 [amd64 + sparc]
+ Intel C Compiler, Pathscale [amd64]
I expect Sun's compiler to be the clear winner on sparc against gcc.
But about amd64 ... this might be interesting, especially against Pathscale.
Programs