[csw-maintainers] Solaris Studio vs GCC

James Lee james at opencsw.org
Sun Mar 18 14:17:08 CET 2012


On 11/03/12, 23:21:30, Peter Bonivart <bonivart at opencsw.org> wrote
regarding Re: [csw-maintainers] Solaris Studio vs GCC:

> On Sun, Mar 11, 2012 at 11:48 PM, Ben Walton <bwalton at opencsw.org> wrote:
> > I understand that performance of the binaries generated by studio used
> > to be superior, but I don't know if that's still the case.  Aside from
> > this (possible) win for studio, what are some of the other reasons
> > we've traditionally preferred it to gcc?

> I'd like to switch the _default_ compiler only. :)

> Today quite some packages are built with gcc anyway due to being too
> hard to build with Studio. If someone feels that Studio will give them
> faster binaries they can still use it. I would like to see some actual
> numbers though for the sake of the discussion. James Lee used to
> provide some back in the day.

Some of this is historic, at one time gcc was faster than cc but that was
when gcc was 2.3 and cc was the one bundled with SunOS4.  Some of gcc's
poor reputation comes from the lacking of 64bit support; using the AMD64
instructions really helps.  This doesn't apply any more and I tried a
like-for-like speed test with a newer gcc however gcc failed to compile
my test code and I didn't waste time on the causes.

The latest speed evidence I have is that my results using cc and Solaris
beat other people's using gcc and either of Linux or MacOSX.  There are
3 differences so we can't tell if it's the compiler, nevertheless my cc
results are faster.

I'm using a highly repetitive floating point test.  This matters because
it's the type of program that runs for a long time hence worth saving
even a tiny amount of time however I'm not the mode user and there is no
need to speed up things that aren't slow which brings me to a second
conclusion: most of the time it is not important which compiler creates
the faster code.

You are free to compile twice and obtain your own results relevant to
your own needs.



James.


More information about the maintainers mailing list