Are your maps allocating unnecessarily?
Consider a map with a std::string as the key type, for example mapping an HTTP route to its handler:
std::unordered_map<std::string, Handler const*> handlers;What actually happens when you try to look things up in this map? Let’s say that you want to test it with handlers.find("/api/v2/accounts/positions/summary"). This code will compile and run quite happily, but under the hood this allocates the literal into an entirely new std::string object, hashes it, finds the value, and then throws the temporary string away.