[Haskell-cafe] ByteString search code available in easy-to-digest form

Justin Bailey jgbailey at gmail.com
Wed Nov 7 17:47:20 EST 2007


On Nov 7, 2007 2:21 PM, Bryan O'Sullivan <bos at serpentine.com> wrote:
> Chris mentioned that he did, but I haven't had time to write anything
> benchmarky yet.

I used the attached program to benchmark the various functions against
"endo.dna"[1], a 7 MB file that came with this year's ICFP contest. It
appends a pattern that occurs nowhere in the file to the end of that
file and then searches for it. Strict and lazy bytestring searches
using KMP are performed, plus a search using the existing bytestring
searches and using a List.

You'll have to change the import from Data.ByteString.KMP for it to
compile but otherwise it should work out of the box..

Justin

[1] http://www.icfpcontest.org/endo.zip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KMPTest.hs
Type: text/x-haskell
Size: 1538 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20071107/8bf6242b/KMPTest-0001.bin


More information about the Haskell-Cafe mailing list