]> granicus.if.org Git - python/commitdiff
Removed unnecesssary bit inversion which doesn't improve dispersion statistics (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 18 Jan 2018 22:27:22 +0000 (14:27 -0800)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>
Thu, 18 Jan 2018 22:27:22 +0000 (14:27 -0800)
(cherry picked from commit fa7880604191f81cbdddc191216f7b1e39a74d8d)

Objects/setobject.c

index 093a15f367f0290c6c7bbe312e858f44859927a7..c742041b16deab8db67d96f048e8e08d31de2558 100644 (file)
@@ -790,7 +790,7 @@ frozenset_hash(PyObject *self)
     hash ^= ((Py_uhash_t)PySet_GET_SIZE(self) + 1) * 1927868237UL;
 
     /* Disperse patterns arising in nested frozensets */
-    hash ^= (hash >> 11) ^ (~hash >> 25);
+    hash ^= (hash >> 11) ^ (hash >> 25);
     hash = hash * 69069U + 907133923UL;
 
     /* -1 is reserved as an error code */