This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/82345] low performance (comparing to clang)


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");
  }
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]