[Bug c++/82345] low performance (comparing to clang)
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 27 17:02:00 GMT 2017
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");
}
}
More information about the Gcc-bugs
mailing list