commit | b501a27ad8ec4b531a9c1057952d8f7c6ef8cb77 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Thu Aug 06 22:15:22 2015 -0700 |
committer | Raymond Hettinger <python@rcn.com> | Thu Aug 06 22:15:22 2015 -0700 |
tree | a6f91d7786d47fe52286239560a7622a54ec83bf | |
parent | 8e9f9852bea430a07af8e33abb1f1b2501e3e3ec [diff] [blame] |
Restore frozenset hash caching removed in cf707dd190a9
diff --git a/Objects/setobject.c b/Objects/setobject.c index 24424ad..0a065cc 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c
@@ -763,6 +763,9 @@ Py_uhash_t hash = 1927868237UL; setentry *entry; + if (so->hash != -1) + return so->hash; + /* Initial dispersion based on the number of active entries */ hash *= (Py_uhash_t)PySet_GET_SIZE(self) + 1;