This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Add _M_grouping_len to the numpunct cache


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.
>
>//////////////
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]