Re: [linux-audio-dev] [ot] [rant] gcc, you let me down one time too many

From: Christian Schoenebeck <cuse@email-addr-hidden>
Date: Sun Jun 05 2005 - 17:45:18 EEST

Es geschah am Sonntag 05 Juni 2005 14:12 als Erik de Castro Lopo schrieb:
> Christian Schoenebeck wrote:
> > Es geschah am Sonntag 05 Juni 2005 04:18 als Erik de Castro Lopo schrieb:
> > > I also find Ocaml a better high level language than Python because
> > > it is strictly and statically typed as well as compiling to native
> > > binaries which come close to the speed of C. The (very flawed IMO)
> > > language shootout puts Ocaml compiled to native binaries as faster
> > > than C++ but slower than C.
> >
> > Hooo, that is a very brave claim,
>
> Not my claim. The claim is here:
>
>
> http://shootout.alioth.debian.org/benchmark.php?test=all&lang=all&sort=full
>cpu
>
> I believe that this shootout is somewhat flawed in that the examples
> are all relatively short pieces of code unlike anything that even
> approaches real world code.
>
> It should be noted that the benchmark attempts to use the technique
> most approriate for the language. So, for the count words example,
> the C++ version uses std::vector from of the STL:z
>
>
> http://shootout.alioth.debian.org/benchmark.php?test=wc&lang=icpp&id=0&sort
>=fullcpu
>
> while the C version uses standard C arrays:
>
>
> http://shootout.alioth.debian.org/benchmark.php?test=wc&lang=icc&id=0&sort=
>fullcpu
>
> Are you surprised that C arrays are faster than std::vector?

Exactly, that's why it's not a valid comparison. With equal code I doubt you
reach faster results with C vs C++ compilation nowadays. Usually they reach
equal performance (e.g. gcc vs. g++). Sometimes you can even reach slightly
better results with compiling the same code with g++ than with gcc due to
conservative "attitude" of gcc. But on the other hand you migh say, that the
latter could be fixed with CFLAGS, so that's why you can still consider their
results to be equal.

Another rumour (also claimed by the site above) is that Intel's compiler would
be faster than GCC. In various DSP benchmarks I made together with Vladimir
S., gcc 3.4's binaries outperformed most binaries build by icc. I have to
note: our focus was SIMD code. Maybe there are few general purpose sections
where icc does a better job than gcc, but being a multimedia developer of
course I'm keen that the code section which is executed the most is as fast
as possible - and that's still the proporional tiny DSP code.

CU
Christian
Received on Sun Jun 5 20:15:10 2005

This archive was generated by hypermail 2.1.8 : Sun Jun 05 2005 - 20:15:10 EEST