Question about the use of stl in game engines.

Started by
41 comments, last by HAM 17 years, 2 months ago
Quote:Original post by zedzeek
Quote:Original post by evolutional
I remember seeing some results posted by snk_kid to compare the performance of Doom3's custom containers to the equivalent STL containers. The STL implementations won out by a huge factor.

thatll be interesting to see (any links)
did it win out with speed / memory usage or both


I've made reference to it in a forum post here, however despite looking for some time I couldn't find the orignal post by snk_kid where he mentions it. I seem to recall it being some time mid-2005 the post was made in a C++ standard lib bashing thread, but beyond that memory fails me [sad]

Quote:Original post by Telastyn
Not a fantastic reference, but the best by far I've found/used is Josuttis' oft recommended "The C++ Standard Library" (30% off from the publisher if you're a GD+ member)


Another vote for this, I've got a copy sitting on my shelf and it's been very useful as both a reference and a tutorial on some of the parts not often mentioned else where (it's good a good section on the io streams for example)
Advertisement
Quote:I've made reference to it in a forum post here, however despite looking for some time I couldn't find the orignal post by snk_kid where he mentions it. I seem to recall it being some time mid-2005 the post was made in a C++ standard lib bashing thread, but beyond that memory fails me [sad]

yeah i had a search as well, could only find stuff about it + not the actual test cases, case speed aint everything memory usage is also very important
though i wouldnt be surprised if it was quicker eg in quake3 IIRC the invsqrt trickery code is actually slower than what is available on modern processors (which is understandable)


I definitely use the STL quite a bit.

However, I also typedef every storage type I use (including primitives). This makes it a non-issue to replace containers later on, with a little forethought.

My opinion:

1. start the project using STL
2. Once you have some larger systems working, then Profile for performance.
3. If you see a bottle neck and think replacing an STL container will help, try it..

But in my experience profiling rarely leads me to replacing STL containers.

This topic is closed to new replies.

Advertisement