Is there already some std::vector based set/map implementation?
问题 For small sets or maps, it's usually much faster to just use a sorted vector, instead of the tree-based set / map - especially for something like 5-10 elements. LLVM has some classes in that spirit, but no real adapter that would provide a std::map like interface backed up with a std::vector . Any (free) implementation of this out there? Edit : Thanks for all the alternative ideas, but I'm really interested in a vector based set/map. I do have specific cases where I tend to create huge