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: [v3] pr 8761 and 7076, caching bits


Benjamin Kosnik writes:
 > 
 > >Jerry, this looks great. I'll put it in later today. Thanks!
 > 
 > Ok, so I was optimistic. With some small changes (attached), mainline is
 > consistently faster than 2.96.
 > 
 > %rm foo.txt ; time gcc-2.96.exe
 > 10.130u 0.730s 0:11.70 92.8%    0+0k 0+0io 135pf+0w
 > 
 > %rm foo.txt ; time 20030215-round-4.exe
 > 8.920u 0.610s 0:18.14 52.5%     0+0k 0+0io 108pf+0w

How does it compare to gcc 2.95 for you?  I tried out this version and
it is about 0.1s slower than what I had posted.  I'm not sure why.  I
think it has to do with the static initialization of
locale_cache<char> and locale_cache<wchar_t> that are no longer there.
The interface vs. _M_populate I think is an improvement.

A quibble:

Since we've added _S_end to __num_base, we should use it here in place
of _S_udigits_end.  I missed this previously:

+       // A list of valid numeric literals: for the standard "C" locale, this
+       // is "-+xX0123456789abcdef0123456789ABCDEF".  This array contains the
+       // chars after having been passed through the current locale's
+       // ctype<_CharT>.widen().
+       _CharT                    _M_literals[__num_base::_S_udigits_end];
 

 > Some questions remain.

What questions are those?

 > Also, the thought of putting this in as a non-virtualized layer of the
 > locale class itself bears investigation. That approach might fit into
 > the confines of the 3.2 ABI. That or a second patch are things I'd like
 > to look into.

How do you see this working?  What is the second patch you have in
mind?

Later,
Jerry Quinn


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