4 ms·
JDK-4045622: Java.lang.String.hashCode – Where Did This Code Come From?
- kleiba 9y agoThe post mentions somewhere further down below that Knuth's treatment of string hash functions is outdated, but unfortunately does not go into details. Can anyone around here elaborate by any chance?
- jerven 9y agoThe bug is from 1997, so not up to date with the latest versions of knuth. There are nice new string hash functions like murmur, cutyhash and xxhash that I believe are not covered in the art of computer programming.
- rurban 9y agoAll of these are not "nice", and are outdated. Murmur is too big, cityhash was replaced by farmhash, xxhash is good for digests, but not for strings.
- wolfgang42 9y agoA fascinating read, but it could use (1997) in the title.
- dpflan 9y agoGood point, thanks. Next time I post some archival content like this I'll add the parenthetical.