正常
flat_map: ordered-container design, learned from Chromium
This directory takes apart Chromium's flat_map / flat_tree and works through the industrial-strength design of implementing an associative container on a sorted vector: why an array beats a tree at small N, the read-heavy write-light home turf, the zero-cost sorted_unique construction, transparent comparators, and EBO. It sits alongside OnceCallback and WeakPtr, rounding out the container-and-performance piece of vol9/chrome.
Full tutorial (full/)
Prerequisites (6 chapters):
- ordered associative containers, introduced
- vector internals and growth
- complexity and amortization
- comparators and transparent lookup
- tag dispatch and sorted_unique
- no_unique_address, EBO, and pair storage
Hands-on (6 chapters):
- motivation and API design
- the flat_tree skeleton
- lookup and insert
- sorted_unique construction
- iterator invalidation and bulk build
- testing and performance
Hands-on design guide (hands_on/)
For readers comfortable with templates and performance: