
From: Bulat Ziganshin
Reply-To: Bulat Ziganshin To: "Branimir Maksimovic" CC: daniel.is.fischer@web.de, Haskell-Cafe@haskell.org Subject: Re: [Haskell-cafe] RE: Substring replacements (was: Differences in optimisiation ...) Date: Sun, 11 Dec 2005 14:03:45 +0300 Hello Branimir,
Sunday, December 11, 2005, 5:19:22 AM, you wrote:
BM> After seeing your test, I've implemented full KMP algorithm, which BM> is blazingly fast with your test. It is slower in mine test due excessive
are you seen http://haskell.org/hawiki/RunTimeCompilation ?
Yes, that's the next step I will take.
can you formulate conditions when straightforward algorithm will be better and when KMP algorithm is preferred?
Startighforward is better when search string is relatively short and there are lot of matches or partial matches within searched string. Exellent example when one is faster then the other is my test when your algorithm is faster and Danilel's test where KMP excels. Greetings, Bane. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/