Use a double trie structure, which has a better time and space behavior to store the goto structure. This structure is also used in https://github.com/hankcs/AhoCorasickDoubleArrayTrie, and is 6 to 10 times faster.
Use a double trie structure, which has a better time and space behavior to store the goto structure.
This structure is also used in https://github.com/hankcs/AhoCorasickDoubleArrayTrie, and is 6 to 10 times faster.