[Patch] Fix libstdc++/13341 (speed-up <wchar_t>::do_narrow/widen)
Paolo Carlini
pcarlini@suse.de
Fri Dec 12 10:53:00 GMT 2003
Benjamin Kosnik wrote:
> Hmmm. Just a thought: instead of storing an array of int, why don't you
> just store an array of char, and don't cache at all if you run into an
> error when constructing the cache?
*Very* nice idea! Probably it didn't occur to me since I didn't realize
that in the exceedingly most common case, wctob never returns EOF for
values in the range 0-127!
Anyway, your suggestion, besides reducing the memory consumption, also
allows for a faster array version.
Updated patch below, tested, as usual, both gnu/generic on x86-linux.
Paolo.
/////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_13341_3
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031212/79413e35/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_13341_3
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031212/79413e35/attachment-0001.ksh>
More information about the Libstdc++
mailing list