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 e
Maybe you're looking for unordered map's and unordered set's. Try taking a look at the TR1 unordered containers that rely on hashing, or the Boost.Unordered container library. Underneath the interface, I'm not sure if they really do use std::vector, but I'd wager it's worth taking a look at.