HashMap collision speed (regression 7->8)

Doug Lea dl at cs.oswego.edu
Thu Jan 15 19:09:36 UTC 2015

On 01/14/2015 10:50 AM, Peter Levart wrote:
> Hi,
> Loosely related to this topic, there is some local variable caching of
> comparableClassFor() result already being performed inside iterative/recursive
> methods of TreeNode, but this caching is just positive caching, meaning that
> null return is not cached. For keys that happen to implement Comparable, but are
> not simple-self-comparable (their class is not of the form: class C implements
> Comparable<C>), reflection is invoked each time comparison of the search key
> with Node key is attempted. This can be improved:
> http://cr.openjdk.java.net/~plevart/jdk9-dev/HM.comparableClassFor/InCallNegativeCache/webrev.01/

Thanks! This seems like a definite improvement, that we ought to
put in place.


More information about the core-libs-dev mailing list