tion algorithm is implemented. All other Aho-Corasick implementations are built by first constructing a noncontiguous NFA. * A [`contiguous::NFA`] is uses a single allocation to represent all states, while still encoding most states as sparse states but permitting states near the starting state to have a dense representation. The dense representation uses more memory, but permits computing transitions during a search more quickly. By only making the most active states dense (the states near the starting state), a contiguous NFA better balances memory usage with search speed. The single contiguous allocation also uses less overhead per state and enables compression tricks where most states only use 8 bytes of heap memory. When given the choice between these two, you almost always want to pick a contiguous NFA. It takes only a little longer to build, but both its memory usage and search speed are typically much better than a noncontiguous NFA. A noncontiguous NFA is useful when prioritizing build times, or when there are so many patterns that a contiguous NFA could not be built. (Currently, because of both memory and search speed improvements, a contiguous NFA has a smaller internal limit on the total number of NFA states it can represent. But you would likely need to have hundreds of thousands or even millions of patterns before you hit this limit.)