~/talk

Understanding And Mastering Flat Containers

Talkat NDC TechTown 2023 · 2023-09-18..09-21· [software-architecture]
links:none on file
slides:none on file

C++23 adds std::flat_ containers implemented as sorted contiguous sequences; the presenter builds naive versions and compares them to std::map and Boost flat_map using homemade benchmarks (release build on a personal PC, elements 10→100k, types: 16/32/64-bit and 3×64-bit). Results show logarithmic find and iteration often beat tree maps (notably at 100k elements), while insert/erase are linear and can invalidate iterators. Recommendation: use for 10–1000 elements* or read-heavy, prebuilt caches; works but needs per-project benchmarking.

AI-written summary · about

  1. 0:00Flat containers intro
  2. 1:09C++ containers overview
  3. 2:55Associative containers core
  4. 4:24std::set and tree internals
  5. 7:58Flat vs tree containers
  6. 10:36Find in flat containers
  7. 12:46Insert/erase in flat containers
  8. 15:38flat_map implementations
  9. 18:06Iterators for flat containers
  10. 21:00flat_map insert/erase
  11. 23:34Flat containers performance
  12. 24:17Cache locality and fragmentation
  13. 29:21Benchmarks vs standard maps
  14. 33:22Find benchmarks
  15. 35:08Insert benchmarks
  16. 36:56Erase benchmarks
  17. 38:23Iteration performance
  18. 39:28Standard vs flat containers
  19. 41:56Flat containers in production
  20. 43:24Best practices for flat containers
  21. 44:50Memory overhead benefits
  22. 46:16Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.