[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2018-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 --- Comment #14 from Jonathan Wakely --- The testcase now scales with the number of CPUs, instead of running effectively single-threaded. If the global locale is changed so std::locale() != std::locale::classic() then every thread contends for t

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2018-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2018-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 --- Comment #12 from Jonathan Wakely --- Author: redi Date: Wed Oct 3 11:27:40 2018 New Revision: 264811 URL: https://gcc.gnu.org/viewcvs?rev=264811&root=gcc&view=rev Log: PR libstdc++/59439 optimize uses of classic ("C") std::locale The globa

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2018-09-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2018-09-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2018-09-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 --- Comment #9 from Jonathan Wakely --- Using current trunk and -O2 to compile the benchmark in comment 8 I get: snprintf 1 threads took 11 ms

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2018-09-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 Jonathan Wakely changed: What|Removed |Added Attachment #31405|0 |1 is obsolete|

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2014-04-20 Thread antoshkka at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 Antony Polukhin changed: What|Removed |Added CC||antoshkka at gmail dot com --- Comment

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2013-12-10 Thread ben.maurer at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 --- Comment #6 from Ben Maurer --- 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 iss

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2013-12-10 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 --- Comment #5 from Jonathan Wakely --- Don't do that then ;-) Noone ever claimed std::stringstream is a good way to convert integers to strings in performance critical code. Even if the std::locale construction is optimized further, stringstream

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2013-12-09 Thread ben.maurer at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 --- Comment #4 from Ben Maurer --- Also, here's where perf says time is being spent. While only 25% is shown as being in the locale constructor/destructor, I suspect that the time spent in other methods is actually related to the ping-ponging of c

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2013-12-09 Thread ben.maurer at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 --- Comment #3 from Ben Maurer --- Created attachment 31405 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31405&action=edit Benchmark _build/opt/experimental/bmaurer/benchmark snprintf 1 threads took 20 ms 2 threads took 20 ms 3 threads to

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2013-12-09 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 --- Comment #2 from Andrew Pinski --- Is there a simple performance testcase you could provide?

[Bug libstdc++/59439] std::locale uses atomic instructions on construction

2013-12-09 Thread ben.maurer at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439 --- Comment #1 from Ben Maurer --- Facebook is putting a $50 bounty on this bug via bountysource: https://www.bountysource.com/issues/1350875