replace cached substr map with calling std::string::substr directly, which is faster.