Container Alternatives:Sorted Vector、Flat Containers 与第三方实现认知 | STL
本章覆盖:sorted vector + lower_bound;read-heavy small map;cache locality;batch build;insertion cost;Boost flat_map;C++23 flat_map / flat_set 的补充定位;Abseil flat_hash_map;Folly / LLVM small-vector-like containers;标准容器不是所有性能场景的唯一选择;企业选型要考虑生态、ABI、维护与可移植性。
本章知识点
- sorted vector + lower_bound
- read-heavy small map
- cache locality
- batch build
- insertion cost
- Boost flat_map
- C++23 flat_map / flat_set 的补充定位
- Abseil flat_hash_map
- Folly / LLVM small-vector-like containers
- 标准容器不是所有性能场景的唯一选择
- 企业选型要考虑生态、ABI、维护与可移植性