ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.89 by dl, Tue Jun 6 11:17:58 2006 UTC vs.
Revision 1.90 by jsr166, Wed Jun 7 23:54:23 2006 UTC

# Line 148 | Line 148 | public class ConcurrentHashMap<K, V> ext
148      /**
149       * Applies a supplemental hash function to a given hashCode, which
150       * defends against poor quality hash functions.  This is critical
151 <     * because HashMap uses power-of two length hash tables, that
152 <     * otherwise encounter collisions for hashCodes that do not differ
153 <     * in lower bits.
151 >     * because ConcurrentHashMap uses power-of-two length hash tables,
152 >     * that otherwise encounter collisions for hashCodes that do not
153 >     * differ in lower bits.
154       */
155 <    static int hash(int h) {
155 >    private static int hash(int h) {
156          // This function ensures that hashCodes that differ only by
157          // constant multiples at each bit position have a bounded
158          // number of collisions (approximately 8 at default load factor).

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines