A Golang implementation of the Aho-Corasick string matching algorithm
Switch branches/tags
Nothing to show
Clone or download
jgrahamc Replace loop in Match with precomputed fails array
It's possible to precompute where following the fail pointers will end up
for any byte and so rather than loop at Match time build an array of fails
pointers to turn the loop into a single lookup.

In tests, this has no significant effect on runtime, but could for a complex
tree.
Latest commit 1ce46e4 Nov 26, 2013

README.md

ahocorasick

A Golang implementation of the Aho-Corasick string matching algorithm