Hi Mike,
I like the 1-liner ... :-)
int h = hashSeed ^ k.hashCode();
... but I'm still missing a little comment, what this xor with a hashSeed serves for. Such as brief,
as the next following 3 lines about preventing from collisions.
WeakHashMap.hash(Object) could be private too, instead final.
And last... you have reinserted/left the space after the cast in some
occurences. ;-)
-Ulf
Am 14.06.2012 17:27, schrieb [email protected]:
Changeset: 505455116320
Author: mduigou
Date: 2012-06-13 16:48 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/505455116320
7173919: Minor optimization of hashing methods
Summary: several minor optimizations to hashing methods used by hash map classes
Reviewed-by: dholmes
! src/share/classes/java/util/HashMap.java
! src/share/classes/java/util/Hashtable.java
! src/share/classes/java/util/WeakHashMap.java
! src/share/classes/java/util/concurrent/ConcurrentHashMap.java