【发布时间】:2011-10-19 06:41:08
【问题描述】:
可能重复:
What are the Complexity guarantees of the standard containers?
从我昨天的问题std::queue<T, list<T> >::size() is slow in O(n)? 的答案中,我了解到我对 STL 容器性能特征的假设并不总是正确的。是时候学习了!
您是否知道任何“备忘单”,例如有关常见 STL(可能还有 Boost)容器的概述,例如 vector、list、deque、map、hash_map/unordered_map 等。关于插入、删除、size() 等操作的性能特征(如标准所示)?
【问题讨论】:
-
在这里定义所有细节:stackoverflow.com/questions/181693/…
标签: c++ performance boost stl containers