[Python-checkins] Removed unnecesssary bit inversion which doesn't improve dispersion statistics (#5235)
Raymond Hettinger
webhook-mailer at python.org
Thu Jan 18 16:23:30 EST 2018
https://github.com/python/cpython/commit/fa7880604191f81cbdddc191216f7b1e39a74d8d
commit: fa7880604191f81cbdddc191216f7b1e39a74d8d
branch: master
author: Raymond Hettinger <rhettinger at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-01-18T13:23:27-08:00
summary:
Removed unnecesssary bit inversion which doesn't improve dispersion statistics (#5235)
files:
M Objects/setobject.c
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 4bc1020d56f..47db6b245ca 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -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 */
More information about the Python-checkins
mailing list