on the speed of std::string::find

Paolo Carlini pcarlini@suse.de
Tue Sep 5 10:29:00 GMT 2006


Dennis Lubert wrote:

>http://www.projectiwear.org/~plasmahh/string_bench_both.png
>This is an update on the benchmarks. Sorry, it looks a bit crowded, but
>nevertheless shows the relevant numbers. The new three lines show how
>the different algorithms scale when the length of the string to be
>searched for gets longer. So the new one scales nearly equally well to
>the memmem implementations in both regards, and I think that the patch
>is a huge improvement. If you still need further tests, let me know
>about the details that shall be tested.
>  
>
I don't, really, and I don't know how to thank you! I'm thinking that 
probably we should keep in touch for further improvements, definitely 
delayed after the release of gcc4.2.0, because indeed, I think we can do 
quite a bit better than the 'memmem' algorithm without the need for 
large tables, high startup times, annoying issues of that kind. Ideally, 
I'm striving for something generic, however, not limited to GNU systems 
and calling in any case char_traits, thus not restricted to char / 
wchar_t specializations. We'll see...

Thanks a lot again,
Paolo.



More information about the Libstdc++ mailing list