]> granicus.if.org Git - python/commitdiff
Removed unnecesssary bit inversion which doesn't improve dispersion statistics (...
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Thu, 18 Jan 2018 21:23:27 +0000 (13:23 -0800)
committerGitHub <noreply@github.com>
Thu, 18 Jan 2018 21:23:27 +0000 (13:23 -0800)
Objects/setobject.c

index 4bc1020d56f77a741a19cd9191994890161ac6b0..47db6b245ca63ca9b9b28e486c6135a35a52265b 100644 (file)
@@ -795,7 +795,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 */