GNU GCC Vs Sun's Compiler on a SPARC
JigSaw writes "When doing research for his evaluation of Solaris 9 on his Ultra 5, Tony Bourke kept running into the same comment online over and over again: Sun's C compiler produces much faster code than GCC does. However, he couldn't find one set of benchmarks to back this up and so he did his own."
Of course a vendors supplied compiler that doesn't have to even think about potential optimizations for another platform will outperform it. It is a testiment to the gcc folks that it is even close.
I have mod points and I am not afraid to use them
...and a better performance not even all of the time, especially on a 32-bit platform, I choose GCC.
However, I'd like to see a well-thought out criticism of this piece. It seems like someone always has a good counterpoint to any given set of benchmarks.
So, the benchmarks show maybe a 10-15% difference in favor of Sun's compiler. Does that Sun's compiler a "clear winner"? I think not.
First of all, it's far from clear that those differences are real. You can get much bigger differences from just changes in caching behavior, even with the same compiler.
Then, there is the question of whether Sun's compiler is actually correct. A lot of commercial compilers intentionally skirt or break the letter of the ANSI standards once you start enabling optimizations. GNU C/C++ is usually more careful.
Finally, you have to ask whether it matters. So, Sun's overpriced machines using their overpriced compilers run a bit faster than their overpriced machines using a free compiler. So what? If you want bang for the buck, or even just maximum bang, why in the world would you buy a Sun these days anyway?
Next they'll be concluding what language is fastest by writing "Hello World!" in C (compiled in 64 & 32 bit), Logo, Perl and Prolog.
I hope to be posting a full writeup on how much faster MS-DOS is compared to BSD using boot times as a benchmark.
Conformity is the jailer of freedom and enemy of growth. -JFK
...of who is using SPARC instead of x86 if they're worried about a 5% performance difference.
May we never see th