http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439

--- Comment #6 from Ben Maurer <ben.maurer at gmail dot com> ---
I agree this isn't necessarily the cleanest way to accomplish this task.

My discovery of this bug came through a real life application which was
deployed to real users and had a noticeable impact due to this issue. This
isn't benchmarking for the sake of benchmarking, an actual developer decided to
write code this way. In the context of their code, choosing stringstream made
slightly more sense because they were combining multiple integers and strings.
However, bug 40088 suggests that other users may have run into this problem in
the past. Given that iostream shows slower, but still reasonable performance in
the single-thread case, it's possible others will run into it in the future.
Machines will only be getting more cores in the future, so this problem may
increase in impact over time.

In any case, I've fixed the original application, and am filing this bug in the
hopes that we can save others debugging time in the future finding bottlenecks
like this.

Reply via email to