[Patch] libstdc++/19642

Paolo Carlini pcarlini@suse.de
Sat Jan 29 09:38:00 GMT 2005


Hi,

on targets using the generic locale model, setlocale can be very slow, thud
the performance of __convert_from_v simply *awful* (~50x sprintf).

The below simple tweak avoids the most costly setlocale calls (*, != NULL)
in the common case ("C" locale) and also uses the cheaper LC_NUMERIC
instead of the full LC_ALL, not needed for sprintf. As the number provided
by submitter show, it's *very* effective for its semplicity. During the past
days I checked the basic assumptions on a very wide range of different 
targets
(many thanks to all the people that helped!), and I'd like to commit it to
mainline, possibly 3_4 too if testing goes well.

Regtested x86/ia64-linux (in the generic model, of course).
Paolo.

/////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_19642
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050129/22b42e24/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_19642
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050129/22b42e24/attachment-0001.ksh>


More information about the Libstdc++ mailing list