hg: jdk8/tl/jdk: 7173919: Minor optimization of hashing methods (original) (raw)
Ulf Zibis Ulf.Zibis at gmx.de
Thu Jun 14 16:29:36 UTC 2012
- Previous message: hg: jdk8/tl/jdk: 7173919: Minor optimization of hashing methods
- Next message: hg: jdk8/tl/jdk: 7173919: Minor optimization of hashing methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 mike.duigou at oracle.com:
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
- Previous message: hg: jdk8/tl/jdk: 7173919: Minor optimization of hashing methods
- Next message: hg: jdk8/tl/jdk: 7173919: Minor optimization of hashing methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]