I was using a map with a std::string key and while everything was working fine I wasn\'t getting the performance I expected. I searched for places to optimize
You are using a const char * as a lookup key for find(). For the map containing const char* this is the correct type that find expects and the lookup can be done directly.
The map containing std::string expects the parameter of find() to be a std::string, so in this case the const char* first has to be converted to a std::string. This is probably the difference you are seeing.