In the similar topic, I'm trying to find maps optimised for a small maximum number of items (8 or 16) indexed by integers.
Curiously I failed to find discussions about this topic..
But std::map seems very badly fit for this kind of map.
I will have a look thanks.
I think I'll implement it with two arrays one for keys one for values and a loop to find the key index, then return the corresponding value
It may be better to fully unroll the loop, I'll have to benchmark this.
SSE may be interesting too.