C++ benchmark – std::vector VS std::list

December 5, 2012 Marc Gregoire General

Here is an interesting article that compares the performance of std::vector with the performance of std::list in various use case scenarios (using a C++11 compiler).
It’s an interesting read. Some people will not expect the results. I’m not going to spoil the conclusion, just a quick look at the graphs in the article should tell you everything.
The conclusion of the article also contains the following excellent recommendation:

If you have the time, in practice, the best way to decide is always to benchmark both versions, or even to try other data structures.

Read the article here.

benchmark, C++, list, vector,


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Powered by WordPress. Designed by elogi.