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

From: fons adriaensen <fons.adriaensen@email-addr-hidden>
Date: Sun Jun 05 2005 - 16:08:09 EEST

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
 
Received on Sun Jun 5 20:15:06 2005

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