Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
JDK-4045622: Java.lang.String.hashCode – Where Did This Code Come From? (java.com)
20 points by dpflan on June 12, 2017 | hide | past | favorite | 5 comments


The 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?


The 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.


All 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.


A fascinating read, but it could use (1997) in the title.


Good point, thanks. Next time I post some archival content like this I'll add the parenthetical.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: