Could this be replaced with a boost::unordered_map (~30% faster) or do you need the sorting function of std::map?