I haven't profiled it since I added caching; also I am using unordered_map of unordered_map, I wonder if a single hash table would be faster
You could try, but I think it would be treating the symptoms rather than the problem itself