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

fons adriaensen fons.adriaensen at skynet.be
Sun Jun 5 13:08:09 UTC 2005


On Sun, Jun 05, 2005 at 10:12:06PM +1000, Erik de Castro Lopo wrote:

> 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:
> 
>     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?

I'm not, but there's no good reason for not using C arrays in C++. STL is just
a library, it's not part of the language, and you're free to use it or not.

My aproach to C++ is very simple: I use it as 'C with classes'. No streams, no
STL, no other nonsense. Gives me the best of both worlds - clean objects and 
low level.

-- 
FA

 




More information about the Linux-audio-dev mailing list