Reduce number of temporary std::strings

Reduces fannkuch.py runtime on my machine from 25.5 secs to 16.5 secs.