This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Add _M_grouping_len to the numpunct cache
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 14 Jan 2004 11:27:49 -0600
- Subject: Re: [Patch] Add _M_grouping_len to the numpunct cache
- Organization: Red Hat / Chicago
- References: <4005474E.10301@suse.de>
Just a minor note, if you look at basic_string, locale::_Impl, others
you'll see that data members for size/length are usually _size, not
_len. Any chance you could do the same for the new additions to numpunct
cache?
appreciated,
benjamin
>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.
>
>//////////////
>