Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jkot
· 10y ago · 0 comments
Also
String.hashCode
is broken, it generates too many collisions. It can not be fixed for historic reasons.
Comments
[–]
arethuza
10y ago
Wasn'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
OP
10y ago
Perhaps, 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.