[Patch/RFC] Fix libstdc++/12988

Paolo Carlini pcarlini@suse.de
Fri Nov 14 14:10:00 GMT 2003


Hi,

the below, trivial change, widen(array) -> widen(char), as
per 22.2.2.2.2, p14, fixes the testcases.

Of course _M_insert_float will be eventually replaced by the
code that Jerry is preparing, but the testcases for float
types will stay ;)

About performance (the widen calls are cached, anyway),
benchmarking reveals that, on x86 at least, for the common case
of no user overridden do_widen and plain chars, calling once
widen(array) (which involved a memcopy) and calling widen(char)
(nop) in a loop are similarly expensive.

Tested x86-linux... will wait a bit...

Paolo.

////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_12988
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031114/ccc88c90/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_12988
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031114/ccc88c90/attachment-0001.ksh>


More information about the Libstdc++ mailing list