https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63466
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
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...
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
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
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