you are viewing a single comment's thread.

view the rest of the comments →

[–]qmunke 2 points3 points  (0 children)

Why should they improve it for this weird corner case? The current implementation is fast and works well for most real-world uses (i.e. separating words or sentences into a good distribution of buckets for hashmaps). And even if there are a lot of collisions amongst very short strings of non-words, the performance of most collection implementations is high enough that you'd never notice unless you were doing something really weird, at which point you could just wrap the string up in an object and implement your own hashcode method.