Quote:> >We have an application that some say "would run faster if we used the
> >vendor's compiler, because of course the vendor knows best how to
> >optimize for their own architecture."
This isn't necessarily so. "Serious" commercial compilers from
specialist compiler companies frequently outperform the vendor's
compilers. On SPARC the best example of this is the Apogee
compilers - even Sun use them for benchmarking (see the notes
at the bottom of the SPEC tables and newsletters).
Quote:> - Current SunPRO C compilers generate better (too much better) code
> with one exception: it doesn't fold float constants (perhaps this
> is fixed in the latest patches)
I agree, mostly, although GCC easily beats SunPro C on some code
(eg: gcc from SPECint92). As with everything, there are swings and
roundabouts... So I'd probably water down the "too much better" bit.
On SPECint92 on an SS10/40, with absolutely the best set of flags
chosen for each compiler (I can supply these to anyone who is
interested), I get:
SPECint92
=========
GCC 2.6.0: 46.2
SunPro C 3.0.1: 50.7
Apogee C 3.0: 55.3
(interesting sub-note: when Sun originally benchmarked the SS10/40
with the V2.0 Apogee compilers they got 51.x, so its interesting to
note the speedup due to compiler improvements since then)
So I'd say the difference between GCC and SunPro C is about 10%.
G++ vs SunPro C++ is probably similar, since both C++ compilers
share their back-ends with their C partner. Note that Apogee is
about 10% better than SunPro...
Quote:> - g++ is not a very good C++ compiler
I wouldn't say that. For a _LONG_ time G++ was _WAY_ better than
SunPro's C++ offering (cfront). SunPro's C++ 4.0 has changed that,
and now I'd rate it as better than G++ because of the better
de*, but I certainly wouldn't say that "g++ is not a very
good C++ compiler".
If the original poster is really serious about absolute maximum
performance, Apogee's new C++ compiler is probably the way to go...
Imagine that CRAY decides to make a personal computer. It contains 16
`Alpha' based processors executing in parallel, has 500 megabytes of RAM,
2500 Megabytes of disk storage, a resolution of 4096 x 4096 pixels, does
24bit 3D graphics in realtime, relies entirely on voice recognition for
input, fits in your shirt pocket and costs $300. What is the first
question the computer community asks?
"Is it DOS compatible?"