News for hackers. Stuff that matters.
Re:Big O, Little N by jp3141 on Friday October 02, 2020 @05:46AM (#24660802)
Javas implementation of HashMap uses a tree on hash collision.

[0] https://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/...

Re:Big O, Little N by quickthrower2 on Friday October 02, 2020 @06:27AM (#24661072)
If the bin is big enough to warrant it, according to your link.

Thanks for the link!

I imagine they do this as the user space can define hash algorithms and someone is gonna just return zero every now and then out of laziness :-)

Re:Big O, Little N by virgilp on Friday October 02, 2020 @09:50AM (#24662557)
You also need a comparable() key presumably - which you often have, but not always (a comparable() key is not strictly required by a hashtable).