[Patch] Improve performance-wise __pad::_S_pad

Paolo Carlini pcarlini@unitus.it
Sun Oct 5 17:58:00 GMT 2003


Hi!

To tell you the truth, I'm quite proud of this evening! ;)

In short:
  1- 4 less locals.
  2- Removed the __builtin_alloca.
  3- Avoid one traits::copy over two: now __oldlen chars are
     copied vs __newlen before, that is now we copy the bare
     minimum number of chars.
  4- Shorter and not less clean code, IMHO.

Indeed, the patch is quite invasive, and, whereas I have regression
tested it (x86-linux, as usual) and carefully checked it on paper,
please double check it! Thanks!

Paolo.

/////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_pad
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031005/91c7ea34/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_pad
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031005/91c7ea34/attachment-0001.ksh>


More information about the Libstdc++ mailing list