HashMapPerformance benefits can be “nullified" by supplying carefully selected keys so you face a lot of collisions. This reduces the access time O (1) / any time for HashMapup to O (n), which significantly reduces performance.
hash32 - , String s, , , . :
Java SE 7u6 -...
- , .
- String.
HashMap Java 8 ad-hoc TreeMap Comparable, - , , O (1) O (lg n) O (1) - O (n) - . String Comparable, , , .