A nice short overview of when you might want your associative container to use a contiguous implementation instead of a tree under the covers:
Ode to a Flat Set
by Jon Kalb
From the article:
The Boost Container library has a family of
flat_*
containers that have associative container interfaces and semantics, but are implemented as sorted vectors.In addition to faster lookup, the
flat_*
containers have much faster iteration, less memory overhead, fewer allocations, and improved cache performance.However, as with all things, there are trade-offs.
Add a Comment
Comments are closed.