[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-02-02 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-02-02 16:48 --- This specific issue is fixed for 4.0.0 and 3.4.4. -- What|Removed |Added Status|ASSIGNE

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-02-02 Thread cvs-commit at gcc dot gnu dot org
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-02 16:47 --- Subject: Bug 19642 CVSROOT:/cvs/gcc Module name:gcc Branch: gcc-3_4-branch Changes by: [EMAIL PROTECTED] 2005-02-02 16:46:40 Modified files: libstdc++-v3 : Change

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-02-02 Thread pcarlini at suse dot de
-- What|Removed |Added Target Milestone|--- |3.4.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19642

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-30 Thread cvs-commit at gcc dot gnu dot org
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-30 14:10 --- Subject: Bug 19642 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2005-01-30 14:09:59 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/confi

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-28 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-28 09:58 --- Thanks. We are now reasonably confident that the patch is safe, besides providing a good performance improvement. Most probably we shall apply it soon, I'll take care of the next steps. Thanks again. --

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread joerg dot richter at pdv-fs dot de
--- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-28 07:54 --- (In reply to comment #26) > Excellent. Can you please check whether on AIX this is ok ("de_DE" is just > an example, any actually installed named locale should do): > [code] > In short, we should make su

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-27 16:56 --- > There's known problems with setlocale not being "stable" on AIX. Thanks for the pointer. I can find only some rather vague hints, around, however... "(un)stable"?!? Or 'just' plain slow?!? ;) ;) > You're right,

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread bkoz at gcc dot gnu dot org
--- Additional Comments From bkoz at gcc dot gnu dot org 2005-01-27 16:38 --- Paolo, just a note. This issue has been raised before on the mailing list. (Or bugzilla, sorry so vague.) If you search stable/AIX/setlocale you might find something. There's known problems with setlocale not

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-27 15:59 --- Excellent. Can you please check whether on AIX this is ok ("de_DE" is just an example, any actually installed named locale should do): #include #include #include int main() { char* save = setlocale(LC_ALL, "

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread joerg dot richter at pdv-fs dot de
--- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-27 15:05 --- With patch draft_19642_3 and count=100 $ time t > /dev/null real 0,64 user 0,60 sys0,01 $ time t cout > /dev/null real 1,14 user 1,12 sys0,00 Now its only 2 times slower than sprin

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-27 12:57 --- Eh! The runtimes are indeed **very** interesting, thanks! And, also, it looks like I was wrong in the last comment: in case LC_ALL is set, this is automatically seen in setlocale(LC_NUMERIC, 0), therefore your sug

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread joerg dot richter at pdv-fs dot de
--- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-27 12:54 --- I think this runtimes of the different setlocale() calls might be interesting: (This is for 100 calls) category locale time LC_ALL00.70s LC_NUMERIC00.29s LC_ALL "C"

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-27 12:46 --- Thanks! For the correctness issue, notice that LC_ALL overrides any LC_*, therefore checking only LC_NUMERIC seems weaker, still, probably effective in most circumstances... -- http://gcc.gnu.org/bugzilla/show_

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread joerg dot richter at pdv-fs dot de
--- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-27 12:39 --- A quick test shows, that std::setlocale(LC_ALL, NULL) returns "C C C C C C". But std::setlocale(LC_NUMERIC, NULL) returns "C" I think it is enough to test LC_NUMERIC. I'll try to test a modified patch.

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-27 12:31 --- Notice, however, that as-is, the patch is not perfect from the correctness point of view: we should also check LC_NUMERIC... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19642

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-27 12:25 --- Can you test the attached? Should help, and we can apply it in 3_4-branch, maybe in mainline too depending on the res of 17140. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19642

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-27 11:11 --- Hi everyone. No, switching by hand to "C" locale cannot help, because, given the current generic locale model, the setlocale calls are issued *anyway*. Indeed, we could envisage improving on this... -- http://

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-27 Thread joerg dot richter at pdv-fs dot de
--- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-27 08:08 --- std::cout.imbue( std::locale( "C" ) ); nor std::cout.imbue( std::locale::classic() ); nor export LANG=C does change anything Joerg -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19642

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread dje at gcc dot gnu dot org
--- Additional Comments From dje at gcc dot gnu dot org 2005-01-26 19:31 --- AIX does not yet implement uselocale(). I am not aware of any faster interface. Does "C" locale help? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19642

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pcarlini at suse dot de
-- What|Removed |Added Status|WAITING |NEW Ever Confirmed||1 Last reconfirmed|-00-00 00:00:00 |2005-01-

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-26 17:34 --- FWIW, the issue doesn't affect linux even if configured --enable-clocale=generic (thus using setlocale). Therefore, on *some* targets setlocale is slow and causes it, not everywhere. -- http://gcc.gnu.org/bugz

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-26 16:17 --- > If it helps you, here the first lines of prof. But in practice some > backtraces > help me a lot more than a a [g]prof output. Its very fast in finding big > bottlenecks, like setlocale in this PR. Ok, thank

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread joerg dot richter at pdv-fs dot de
--- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-26 16:00 --- If it helps you, here the first lines of prof. But in practice some backtraces help me a lot more than a a [g]prof output. Its very fast in finding big bottlenecks, like setlocale in this PR. count =

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-26 15:45 --- > Doesn't a function that is on 99% of all call stacks automatically consume > 99% > of the runtime? Ok, the time can also be spend in the childs like here in > __issetuid, but this is an implementation detail o

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread joerg dot richter at pdv-fs dot de
--- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-26 15:41 --- > ;) No, I mean *relative* percentages: setlocal in your profile is on top, higher > than __convert_from_v and everything else. I'm asking: is consuming 1%, 10%, or > 99% of the total runtime? Doesn't

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-26 15:37 --- For reference, on linux, a typical profile (count = 1000) begins as follows, and: 1- The various snprintf are on top. 2- uselocale (the thread safe equivalent of setlocale) is way below Therefore, we can easily

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-26 15:22 --- > Ok, lets say I took 100 backtraces and got 99 times this one. I hope this is > enough percentage. ;) No, I mean *relative* percentages: setlocal in your profile is on top, higher than __convert_from_v and every

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread joerg dot richter at pdv-fs dot de
--- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-26 15:18 --- Ok, lets say I took 100 backtraces and got 99 times this one. I hope this is enough percentage. _GLIBCXX_USE_C99 is defined -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19642

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-26 15:10 --- Honestly, this doesn't help much, the percentages are important: suppose, for some reason, setlocale is very slow on AIX... Is _GLIBCXX_USE_C99 defined, on AIX? I'm asking because internally __convert_from_v uses s

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread joerg dot richter at pdv-fs dot de
--- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-26 15:00 --- I took some backtraces during a longer run of the program and most of the time it looked like this: (I removed some templates to make it readable) __issetuid load_locale setlocale int std::__convert_fr

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pcarlini at suse dot de
-- What|Removed |Added Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19642

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-26 14:47 --- Wait a minute... Ok, we have got 17140, but here, if the issue is confirmed, we are talking about 2 orders of magnitude!?!?! Indeed, on my P4-2400 (gcc3.4.3, actually, similar bevavior for mainline) I cannot confi

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-26 14:34 --- *** This bug has been marked as a duplicate of 17140 *** -- What|Removed |Added

[Bug libstdc++/19642] streaming doubles is very slow compared to sprintf

2005-01-26 Thread pinskia at gcc dot gnu dot org
-- What|Removed |Added Component|c++ |libstdc++ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19642