Performance of the set is comparable to that of {@link java.util.TreeSet}for Strings, ie. 2-3x slower than {@link java.util.HashSet} whenusing pre-constructed Strings. This is generally result of algorithmic complexity of structures; Word and Tree sets are roughly logarithmic to the whole data, whereas Hash set is linear to the length of key. However:
Although this is an efficient set for specific set of usage patterns, one restriction is that the full set of words to include has to be known before constructing the set. Also, the size of the set is limited to total word content of about 20k characters; factory method does verify the limit and indicates if an instance can not be created.
|
|
|
|