For large static maps, you are better to use a sorted vector of pairs, then using std::lower_bound to search through it. (i.e. std::vector<std::pair<int, int>> myBigListOfStuff)