https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82345
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- When I compare the performance of this similar program on a text file of 4 million lines I see gcc performs slightly better: #include <fstream> #include <string> #include <experimental/string_view> int main(int , char**argv) { std::ifstream in(argv[1]); std::string line; while (std::getline(in, line)) { auto pos = std::experimental::string_view(line).find("http"); } }