on the speed of std::string::find

Paolo Carlini pcarlini@suse.de
Mon Sep 4 09:21:00 GMT 2006


Paolo Carlini wrote:

> ... - The old string::find; 2- The current string::find; 3- The 
> version forwarding to memmem; + double check that 1- added of the 
> first char optimization becomes equivalent to 3-.

Denis, can you try on your real data the below, which changes find to 
simply become similar to glibc' memmem? Here, in some basic tests it 
does rather well, better than going through std::search... humm...

Thanks,
Paolo.

///////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_d_find
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20060904/d14e46bc/attachment.ksh>


More information about the Libstdc++ mailing list