HashMap has better performance in my test cases.

This commit is contained in:
ryan 2014-10-06 13:34:03 -07:00
parent a46e7dfe1d
commit d1478c7480

View File

@ -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<Character,State> success = new TreeMap<Character, State>();
private Map<Character,State> success = new HashMap<Character, State>();
/** if no matching states are found, the failure state will be returned */
private State failure = null;