[ODE] RE: ALLOCA

Shaul Kedem shaul_kedem at yahoo.com
Fri Feb 27 05:31:17 MST 2004


I can add to that "don't use STL with multithreaded
apps -ever-"...

An STL vector is good for single threaded stuff and
even then you need to be very careful with it (it has
the tendency to call the copy constructor of the
value's class in order to move objects around)...



--- Pierre Terdiman <pierre.terdiman at novodex.com>
wrote:
> > I have a linear algebra package based on
> std::vector<> for storage which
> > I have been using since two years without any
> performance problems.
> 
> Depends on your app, really.
> 
> Have a look at generated assembly (*) for a simple
> "push_back()" (for a
> simple vector of ints, no need to even start
> involving copy constructors),
> and mentally duplicate this for all the places you
> use this function. This
> single experience was enough for me to ban
> std::vector<> forever, in all
> places where performance actually matters.
> 
> (*) Or check out attached file (VC++ 6 / latest
> service pack)
> 
> 
> > Gerhard Wesp             o o           Tel.: +41
> (0) 43 5347636
> > Bachtobelstrasse 56       |      
> http://www.cosy.sbg.ac.at/~gwesp/
> > CH-8045 Zuerich          \_/
> 
> Pierre Terdiman / Novodex (Zürich too)
> 

> ATTACHMENT part 2 application/x-zip-compressed
name=TestArray.zip
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
> 


__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools


More information about the ODE mailing list