On Jan 2, 2006, at 8:52 PM, Stefan Teleman wrote:

By any chance, do you have comparision links between Studio and
gcc-4.x ?

Latest issue of Linux Magazine discusses gcc-4.x vs gcc-3.x. the
results of the comparison are not spectacular, or much different than
gcc 3.x.

i don't have links, but i have a test program, with results. because
of the restrictions prohibiting the posting of benchmark results
unless explicitly authorized by Sun, i can only post the output of
this program here. if someone from Sun says it's ok to post the whole
thing, i will gladly do so.

Disclaimer: This Is Not A Benchmark. This is a silly test program.

When I run oopack and stepanov last time (admittedly, quite some time ago)
though both compilers, I got results the other way around on both,
x86 and SPARC.

As I remember, the difference in C was not big at all. Sun Studio
was a bit faster on SPARC and a bit slower on x86. But it was C++
where the difference was big in favour on gcc.

Here are some C/C++ benchmarks, like oopack and stepanov, which have
same routines written in C and C++ language.
http://annwm.lbl.gov/bench/
http://www.ratol.fi/~sfarin/cpp-bench/

Things have probably changed since then as there were major compiler
releases since then. Maybe it would be a good time to rerun it with
Sun Studio 11 (-fast) and equivalent on gcc 4.0 (-O3 -ffast-math
-funroll-loops -mcpu=ultrasparc3 -m64 -mvis -ftree-vectorize).
And after all, they are still just benchmarks. Results could be the
other way around with different benchmarks as seen in your case.

But speed it not all. I tend to use Sun Studio myself, mainly
because of binary stability. With gcc I had several times some
linking issues. I also almost always prefer -xO4 over -fast and
-O2 instead of -O3, except when the software if CPU intensive and
I can benchmark it and see some significant improvement.
I prefer stability over a few percent of speed improvement (if any).

Damjan
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to