4 ms·
I only took a quick skim, but it doesn't look like they do the optimization to aho-corasick where you store connections directly to "leaf" nodes (ie: nodes wher
by chillee 8y ago
I only took a quick skim, but it doesn't look like they do the optimization to aho-corasick where you store connections directly to "leaf" nodes (ie: nodes where you can have a finished match).
If I'm right, that would probably speed things up significantly.
- saagarjha 8y agoSorry, what optimization are you talking about? If you're just path compression, then I don't think this works because you miss out on generating failure links as you go along.
- chillee 8y agoIt basically is path compression. You still need to maintain failure links, but at every step, when you step up your parents to find all matches, you jump directly to leaves.