http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html
According to that article STL isn't suited for game-development. What are your thoughts about this ?
My current approach is this : use STL, if leads to performance problems exchange with homebrew container (or allocator) (didn't come to it yet, but I'm not doing a high-end 3d game ;) )
Your approach is the only sane option in this case. Rule #1 for optimization is "do not optimize unless you know exactly where the bottlenecks are".
You should still be able to swap your container relatively easily later on, especially if you use a type defined via typedef instead of directly using the STL container. I mean something like:
#include <vector>
typedef std::vector<int> MyIntVectorType;
int main()
{
MyIntVectorType theVector;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With