Understanding And Mastering Flat Containers - Vitaly Fanaskov - NDC TechTown 2023

Explore the world of flat containers with Vitaly Fanaskov, delving into their properties, usage scenarios, and considerations for implementation, with a focus on benchmarking, memory management, and more.

Key takeaways
  • Flat containers’ fundamental properties, such as tree’s sorting property, guarantee good complexities.
  • A simple and naive implementation of flatMap is provided, with a tree shown as underlying container.
  • Key takeaways: flat containers are not implemented in the standard library as of C++23, though proposed; usage scenarios for flat containers include small caches and embedded systems; flat containers have less memory overhead.
  • The talk also touches on:
    • Benchmarking results for flatMap, comparing it to other containers.
    • Tree’s structure and how it provides good complexity for search operations.
    • Important considerations for container and iterator implementation.
    • Potential issues with memory fragmentation and contiguous memory allocation.
    • Pros and cons of using flat containers in real production.
    • Naive implementation of flatMap’s iterator.