Greatly enhanced automaton performance by using a better hash function.