[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementatio

Subject: Re: [Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementation
From: Donald Bruce Stewart
Date: Wed, 1 Aug 2007 12:07:09 +1000
> I've implemented KMP string searching for lazy bytestrings, and I'd
> like some help improving the performance of the code. I'd also like to
> know if it doesn't look correct - I've tested it pretty extensively
> but you never know ...
> I've been testing on a 7 MB file, where the search sequence is not
> found. Using strict byestrings, lazy bytestrings, and regular strings,
> I've found my algorithm is about twice as slow as the strict version.
> Surprisingly, the strict version is a little bit *slower* than the
> regular strings version.
> Thanks for any comments or help!
> Justin

Also, be sure to compare against a naive search, optimised for
strict and lazy bytestrings,


If its not faster than those 2, then you're doing something wrong :)

-- Don
Haskell-Cafe mailing list
[email protected]

<Prev in Thread] Current Thread [Next in Thread>