This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/82345] low performance (comparing to clang)
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 Sep 2017 17:02:20 +0000
- Subject: [Bug c++/82345] low performance (comparing to clang)
- Auto-submitted: auto-generated
- References: <bug-82345-4@http.gcc.gnu.org/bugzilla/>
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");
}
}