Y
Hacker News
new
|
ask
|
show
|
jobs
by
jkot
3547 days ago
Also
String.hashCode
is broken, it generates too many collisions. It can not be fixed for historic reasons.
1 comments
arethuza
3547 days 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.
link
jkot
3547 days 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.
link