Daniel Fischer <[EMAIL PROTECTED]> wrote: > The fast searching function on ByteStrings has already been written > for you :) > That's in ghc 6.8.3, which is not in gentoo but only in the haskell overlay, which means that all blame goes to the gentoo maintainers for being utterly out of date.
The KMP import works like a charm. findSubstring is only defined for strict bytestrings... try running those benchmarks again, this time on data bigger than your ram. Not to mention that it's deprecated. The really interesting topic is hacking Parsec to use KMP search on "manyTill anyChar (try string match), or rather any recursive try involving combinators that can calculate the position for the next candidate match as a side effect. PS: Thank you for not pointing out that my original code crashes on B.tail B.empty in some cases, or even just that it can't replace overlapping matches at all. -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or broadcasting of this signature prohibited. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe