[Patch] Do not include <cstring> (too often ;)

Paolo Carlini pcarlini@suse.de
Mon May 7 16:10:00 GMT 2007


Hi,

the below simple patch avoids including <cstring> together with any 
containers and <algorithm>, about 12 KB of saving. Actually, we could do 
much better, and never include <cstring> in the entire set of headers, 
if only we had __builtin_memchr (also useful from the optimization point 
of view for char_traits<char>::find and elsewhere): earlier today I 
filed other/31852 about that and may end up working on it myself if 
nobody beats me, seems doable with a very reasonable effort along the 
lines of __builtin_strchr.

Tested x86-linux, without PCHs.

Paolo.

////////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_cstring_1
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20070507/b28b4caf/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_cstring_1
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20070507/b28b4caf/attachment-0001.ksh>


More information about the Libstdc++ mailing list