Out of curiosity.. Why are you using a list? Why not a std::vector? A std::vector has better performance than a std::list, and I'm not only talking about memory usage, a std::vector is actually much faster than a std::list. (CPU caching and such)
A further explanation is here:
http://channel9.msdn...rup-Cpp11-Style
Skip to around 44 minutes, he gets into it at like 44:40. (Although I recommend watching all of it, if you haven't)
Show differencesHistory of post edits
#1pinebanana
Posted 01 December 2012 - 07:24 AM
Out of curiosity.. Why are you using a list? Why not a std::vector? I'm not only talking about memory usage, a std::vector is actually much faster than a std::list, because a std::vector can be cached.
A further explanation is here:
http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Keynote-Bjarne-Stroustrup-Cpp11-Style
Skip to around 44 minutes, he gets into it at like 44:40. (Although I recommend watching all of it, if you haven't)
A further explanation is here:
http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Keynote-Bjarne-Stroustrup-Cpp11-Style
Skip to around 44 minutes, he gets into it at like 44:40. (Although I recommend watching all of it, if you haven't)