[Haskell-cafe] Substring replacements

Branimir Maksimovic bmaxa at hotmail.com
Tue Dec 20 13:48:48 EST 2005


I've finally performed test on amd64 and result is a same as on intel.
KMP always wins. So KMP is best suited for non indexed strings
and I guess should be used in library as prefered search/replace method.
This test favors straightforward search.

[bmaxa at devel64 myhaskell]$ time ./KMP
Working:seasearch replace  able seaseasearch baker seasearch charlie
True
Done


real    0m10.783s
user    0m10.769s
sys     0m0.016s
[bmaxa at devel64 myhaskell]$ time ./straightforward
Working:seasearch replace  able seaseasearch baker seasearch charlie
True
Done


real    0m11.769s
user    0m11.741s
sys     0m0.028s
[bmaxa at devel64 myhaskell]$ uname -a
Linux devel64.office.kom 2.6.14-skas3-v8.2 #2 Fri Nov 11 21:19:36 CET 2005 
x86_64 x86_64 x86_64 GNU/Linux

Greetings, Bane.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Haskell-Cafe mailing list