[Haskell-cafe] RE: Substring replacements (was: Differences in
bmaxa at hotmail.com
Sun Dec 11 10:46:40 EST 2005
>From: Bulat Ziganshin <bulatz at HotPOP.com>
>Reply-To: Bulat Ziganshin <bulatz at HotPOP.com>
>To: "Branimir Maksimovic" <bmaxa at hotmail.com>
>CC: daniel.is.fischer at web.de, Haskell-Cafe at haskell.org
>Subject: Re: [Haskell-cafe] RE: Substring replacements (was: Differences in
>Date: Sun, 11 Dec 2005 14:03:45 +0300
>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
>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.
Express yourself instantly with MSN Messenger! Download today it's FREE!
More information about the Haskell-Cafe