5 ms·
Also String.hashCode is broken, it generates too many collisions. It can not be fixed for historic reasons.
by jkot 10y ago
Also String.hashCode is broken, it generates too many collisions. It can not be fixed for historic reasons.
- arethuza 10y agoWasn't an early version really broken - where it only looked at the first N characters of a string when hashing it? Where N was actually pretty low.
- jkot 10y agoPerhaps, but it made sense with 16MB RAM and 486 CPU. Current implementation uses 31 multiplier which is useless over 1M entries. This problem is also in Arrays.hash*() and many other places.