[Patch] Add _M_grouping_len to the numpunct cache
Paolo Carlini
pcarlini@suse.de
Wed Jan 14 13:41:00 GMT 2004
Hi,
the below completes the work, changing the last remaining C-string
to char array + length. In this case, we avoid both computing again
and again the string length and also constructing again and again
a basic_string from an immutable C-string in order to pass the former
to __verify_grouping. As a side effect, the tweaked __verify_grouping,
(taking now a const char* and a size_t) is 20 bytes smaller, i.e.,
576 bytes (-O2, stripped), its speed is the same.
An interesting tweak of this work is that __verify_grouping is not a
template anymore: I say interesting because, actually, there was _no_
real reason for that also _before_ the patch: the grouping, according
to the standard is always a basic_string<char>.
Tested x86-linux, will commit later today if nobody objects.
Paolo.
//////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_group
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040114/4505f02b/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_group
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040114/4505f02b/attachment-0001.ksh>
More information about the Libstdc++
mailing list