[Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementation

Justin Bailey jgbailey at gmail.com
Tue Jul 31 15:34:17 EDT 2007

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!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: KMPSeq.hs
Type: application/octet-stream
Size: 10796 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070731/bc578c30/KMPSeq-0001.obj

More information about the Haskell-Cafe mailing list