Lookup is to be done either by integer or by string. Both integer and strings are guaranteed to be unique in the collection. The size of the collection is ~500 of those pairs.
The interface of the collection would be 2 functions, one to translate the integer to string and one to translate the string to the corresponding integer.
It seems there is no methodology to pick up the "proper" container.
An idea would be to use std::vector, which is the default and since it will be stored in a contiguous memory we ensure cache hits? But I know the size of the collection at compile time, so std::array?
Or since order is not important but the look up needs to be fast we can use a hash based solution like an std::map? But then what is the key and what is the value? Or one can have 2 std::maps (std::map<int, std::string> and std::map(std::string, int)) with duplicated the information, since anyway the collection is small.
I know that the ultimate answer would be to benchmark it, but I am wondering if there is any actual methodology to know what to pick based on principle.