https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-09-26 Ever confirmed|0 |1 --- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> --- I have a patch that gets that down to: snprintf 1 threads took 7 ms 2 threads took 7 ms 3 threads took 7 ms 4 threads took 7 ms 5 threads took 15 ms 6 threads took 16 ms 7 threads took 16 ms 8 threads took 16 ms 9 threads took 21 ms 10 threads took 22 ms 11 threads took 28 ms 12 threads took 23 ms 13 threads took 30 ms 14 threads took 30 ms 15 threads took 32 ms 16 threads took 32 ms 17 threads took 35 ms 18 threads took 38 ms 19 threads took 41 ms 20 threads took 40 ms 21 threads took 44 ms 22 threads took 48 ms 23 threads took 49 ms 24 threads took 50 ms 25 threads took 51 ms 26 threads took 54 ms 27 threads took 54 ms 28 threads took 56 ms 29 threads took 59 ms 30 threads took 60 ms 31 threads took 63 ms iostream 1 threads took 29 ms 2 threads took 30 ms 3 threads took 31 ms 4 threads took 31 ms 5 threads took 59 ms 6 threads took 63 ms 7 threads took 64 ms 8 threads took 64 ms 9 threads took 82 ms 10 threads took 83 ms 11 threads took 99 ms 12 threads took 105 ms 13 threads took 112 ms 14 threads took 118 ms 15 threads took 123 ms 16 threads took 132 ms 17 threads took 140 ms 18 threads took 148 ms 19 threads took 162 ms 20 threads took 164 ms 21 threads took 174 ms 22 threads took 182 ms 23 threads took 194 ms 24 threads took 196 ms 25 threads took 210 ms 26 threads took 209 ms 27 threads took 220 ms 28 threads took 226 ms 29 threads took 234 ms 30 threads took 243 ms 31 threads took 252 ms That's for 8 HT cores on Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz For 4 HT cores on Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz the improvement is a lot less impressive, going from current trunk's: snprintf 1 threads took 17 ms 2 threads took 15 ms ... 31 threads took 186 ms iostream 1 threads took 52 ms 2 threads took 105 ms 31 threads took 1430 ms to: snprintf 1 threads took 15 ms 2 threads took 12 ms ... 31 threads took 168 ms iostream 1 threads took 47 ms 2 threads took 48 ms ... 31 threads took 675 ms But that's still a significant improvement. I'll finish testing and post to the mailing list.