[Bug libstdc++/63466] sstream is very slow

2017-10-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63466 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug libstdc++/63466] sstream is very slow

2014-10-06 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63466 --- Comment #1 from Marc Glisse --- To be a bit less unfair, you could pull the declarations of the 3 variables out of the loop. Even if optimizations are possible, I doubt we can go anywhere near the C perf...

[Bug libstdc++/63466] sstream is very slow

2014-10-06 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63466 --- Comment #2 from Andi Kleen --- Looking at the profile there's plenty of room for optimization. e.g. not using getc/ungetc, but directly accessing the buffer, or maybe even some kind of template specialization. With the variables pulled out i

[Bug libstdc++/63466] sstream is very slow

2014-10-07 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63466 --- Comment #3 from Jonathan Wakely --- You're comparing apples and oranges. This function forces you to do additional allocations for the arguments, which has nothing to do with iostream performance: void __attribute__((noinline, noclone)) f

[Bug libstdc++/63466] sstream is very slow

2014-10-07 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63466 --- Comment #4 from Jonathan Wakely --- The calls you see to getc are nothing to do with , they're from the std::getline call reading from stdin, and are required because you didn't tell the C++ runtime that you don't need it to be synchronised w