Closed rageagainsthepc closed 10 months ago
https://dzone.com/articles/c-benchmark-%E2%80%93-stdvector-vs
TLDR: std::vector is almost always better than std::list, except for a few special cases such as always inserting elements at the front or handling large elements.
std::vector
std::list
[VMICore] Kudos, SonarCloud Quality Gate passed!
0 Bugs 0 Vulnerabilities 0 Security Hotspots 0 Code Smells
50.0% Coverage 0.0% Duplication
https://dzone.com/articles/c-benchmark-%E2%80%93-stdvector-vs
TLDR:
std::vector
is almost always better thanstd::list
, except for a few special cases such as always inserting elements at the front or handling large elements.