Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Knuth-Morris-Pratt

5 views
Skip to first unread message

Jean-Christophe Filliatre

unread,
Jul 26, 2007, 9:06:12 AM7/26/07
to caml...@inria.fr

As a byproduct of the last ICFP programming contest, I'm releasing an
implementation of Knuth-Morris-Pratt string searching algorithm that I
wrote years ago. You can find it here, in my ocaml bazar:

http://www.lri.fr/~filliatr/software.en.html

Just in case it may be useful, as it finally happened to be for myself.

--
Jean-Christophe, a Caml Rider


_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Christopher L Conway

unread,
Jul 26, 2007, 10:31:03 AM7/26/07
to Jean-Christophe Filliatre, caml...@inria.fr
Hmm. My KMP implementation turned out to be a real bottleneck in my
ICFP code; I suspected I should have chosen Boyer-Moore (not knowing
anything about the constant factors of each, just stabbing in the
dark)... Maybe it was the average-case O(log n) "get" in my "rope"
implementation...

Chris

Markus E.L.

unread,
Jul 26, 2007, 11:08:53 AM7/26/07
to caml...@yquem.inria.fr

> As a byproduct of the last ICFP programming contest, I'm releasing an
> implementation of Knuth-Morris-Pratt string searching algorithm that I
> wrote years ago. You can find it here, in my ocaml bazar:
>
> http://www.lri.fr/~filliatr/software.en.html
>
> Just in case it may be useful, as it finally happened to be for myself.

Nice + Thanks.

BTW: Many sources at your site aren't carrying any license/copyright
notice (kmp at least doesn't). If I understand european copyright law
right that means it defaults to look only, don't use, don't
distribute. Was that really your intention?

Alain Frisch

unread,
Jul 26, 2007, 8:22:12 PM7/26/07
to caml...@inria.fr
Christopher L Conway wrote:
> Hmm. My KMP implementation turned out to be a real bottleneck in my
> ICFP code; I suspected I should have chosen Boyer-Moore (not knowing
> anything about the constant factors of each, just stabbing in the
> dark)... Maybe it was the average-case O(log n) "get" in my "rope"
> implementation...

Boyer-Moore is more useful with a large alphabet. With only 4
characters, I don't think it would have helped you a lot for the contest
(I might be wrong).

-- Alain

0 new messages