haskell-cafe@haskell.org
[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
jgbailey:
> 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,

    http://hpaste.org/1803

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

-- Don
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

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