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
I just stumbled upon your question, hope its not too late.
I recommend a great (open source) library named Loki. It has a vector based implementation of an associative container that is a drop-in replacement for std::map, called AssocVector.
It offers better performance for accessing elements (and worst performance for insertions/deletions).
The library was written by Andrei Alexandrescu author of Modern C++ Design.
It also contains some other really nifty stuff.