From d1478c7480f07ce00c12cda3f02c213de59e8aae Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 6 Oct 2014 13:34:03 -0700 Subject: [PATCH] HashMap has better performance in my test cases. --- src/main/java/org/ahocorasick/trie/State.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/ahocorasick/trie/State.java b/src/main/java/org/ahocorasick/trie/State.java index 1173fe9..5220f72 100644 --- a/src/main/java/org/ahocorasick/trie/State.java +++ b/src/main/java/org/ahocorasick/trie/State.java @@ -35,7 +35,7 @@ public class State { * referred to in the white paper as the 'goto' structure. From a state it is possible to go * to other states, depending on the character passed. */ - private Map success = new TreeMap(); + private Map success = new HashMap(); /** if no matching states are found, the failure state will be returned */ private State failure = null;