Commit Graph

254 Commits

Author SHA1 Message Date
Raymond Hettinger
4148195c45 Move the active entry multiplication to later in the hash calculation 2015-08-07 00:43:39 -07:00
Raymond Hettinger
b501a27ad8 Restore frozenset hash caching removed in cf707dd190a9 2015-08-06 22:15:22 -07:00
Raymond Hettinger
a286a51ae1 Fix comment typo 2015-08-01 11:07:11 -07:00
Raymond Hettinger
36c0500990 Tweak the comments 2015-08-01 10:57:42 -07:00
Raymond Hettinger
fbffdef47d Issue #24762: Speed-up frozenset_hash() and greatly beef-up the comments. 2015-08-01 09:53:00 -07:00
Raymond Hettinger
daffc916aa Issue #24681: Move the most likely test first in set_add_entry(). 2015-07-31 07:58:56 -07:00
Raymond Hettinger
70559b5c20 Issue #24681: Move the store of so->table to the code block where it is used. 2015-07-23 07:42:23 -04:00
Raymond Hettinger
ff9e18a863 Issue #24583: Consolidate previous set object updates into a single function
with a single entry point, named exit points at the bottom, more self-evident
refcount adjustments, and a comment describing why the pre-increment was
necessary at all.
2015-07-20 07:34:05 -04:00
Raymond Hettinger
482c05cbb5 Issue #24583: Fix refcount leak. 2015-07-20 01:23:32 -04:00
Raymond Hettinger
061091a7c5 Issue #24583: Fix crash when set is mutated while being updated. 2015-07-15 23:54:02 -07:00
Raymond Hettinger
d702044bcd merge 2015-07-15 23:52:29 -07:00
Raymond Hettinger
a3626bc5bd Issue #24583: Fix crash when set is mutated while being updated. 2015-07-15 23:50:14 -07:00
Raymond Hettinger
5d2385ff6f Neaten-up a little bit. 2015-07-08 11:52:27 -07:00
Raymond Hettinger
9632a7d735 Issue 24581: Revert c9782a9ac031 pending a stronger test for mutation during iteration. 2015-07-07 15:29:24 -07:00
Raymond Hettinger
11ce8e6c37 Minor bit of factoring-out common code. 2015-07-06 19:08:49 -07:00
Raymond Hettinger
3dbc11cadd Tighten-up code in the set iterator to use an entry pointer rather than indexing. 2015-07-06 19:03:01 -07:00
Raymond Hettinger
ef6bd7d963 Tighten-up code in set_next() to use an entry pointer rather than indexing. 2015-07-06 08:43:37 -07:00
Raymond Hettinger
b48d6a63ff Bring related functions add/contains/discard together in the code. 2015-07-05 16:27:44 -07:00
Raymond Hettinger
73799b181e Change add/contains/discard calls to pass the key and hash instead of an entry struct. 2015-07-05 16:06:10 -07:00
Raymond Hettinger
dc28d5a198 Clean-up call patterns for add/contains/discard to better match the caller's needs. 2015-07-05 10:03:20 -07:00
Raymond Hettinger
ac2ef65c32 Make the unicode equality test an external function rather than in-lining it.
The real benefit of the unicode specialized function comes from
bypassing the overhead of PyObject_RichCompareBool() and not
from being in-lined (especially since there was almost no shared
data between the caller and callee).  Also, the in-lining was
having a negative effect on code generation for the callee.
2015-07-04 16:04:44 -07:00
Raymond Hettinger
e186c7674c Make sure the dummy percentage calculation won't overflow. 2015-07-04 11:28:35 -07:00
Raymond Hettinger
c2480dc0c4 Minor cleanup. 2015-07-04 08:46:31 -07:00
Raymond Hettinger
b322326f48 Minor nit: Make the style of checking error return values more consistent. 2015-07-03 23:37:16 -07:00
Raymond Hettinger
4897300276 Minor factoring: move redundant resize scaling logic into the resize function. 2015-07-03 20:00:03 -07:00