http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60936
--- Comment #1 from __vic <d.v.a at ngs dot ru> --- If we use iostream classes (without std::string) the difference isn't so dramatic: 4.7: 800320 4.8: 838944 4.9: 868664 May be it's connected with locales? Has std::string any dependences on it in 4.9?