Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | | | Hoist constant expressions (so->table and so->mask) out of the inner-loop. | Raymond Hettinger | 2015-12-14 | 1 | -12/+12 | |
| | | | | ||||||
* | | | | Add assertion to verify the pre-condition in the comments. | Raymond Hettinger | 2015-11-18 | 1 | -0/+1 | |
| | | | | ||||||
* | | | | Issue #25629: Move set fill/used updates out of inner loop | Raymond Hettinger | 2015-11-17 | 1 | -7/+8 | |
| | | | | ||||||
* | | | | Move the active entry multiplication to later in the hash calculation | Raymond Hettinger | 2015-08-07 | 1 | -4/+4 | |
| | | | | ||||||
* | | | | Restore frozenset hash caching removed in cf707dd190a9 | Raymond Hettinger | 2015-08-07 | 1 | -0/+3 | |
| | | | | ||||||
* | | | | Fix comment typo | Raymond Hettinger | 2015-08-01 | 1 | -1/+1 | |
| | | | | ||||||
* | | | | Tweak the comments | Raymond Hettinger | 2015-08-01 | 1 | -1/+3 | |
| | | | | ||||||
* | | | | Issue #24762: Speed-up frozenset_hash() and greatly beef-up the comments. | Raymond Hettinger | 2015-08-01 | 1 | -27/+43 | |
| | | | | ||||||
* | | | | Issue #24681: Move the most likely test first in set_add_entry(). | Raymond Hettinger | 2015-07-31 | 1 | -6/+9 | |
| | | | | ||||||
* | | | | Issue #24681: Move the store of so->table to the code block where it is used. | Raymond Hettinger | 2015-07-23 | 1 | -7/+10 | |
| | | | | ||||||
* | | | | Issue #24583: Consolidate previous set object updates into a single function | Raymond Hettinger | 2015-07-20 | 1 | -19/+20 | |
| | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||||
* | | | | Issue #24583: Fix refcount leak. | Raymond Hettinger | 2015-07-20 | 1 | -1/+5 | |
| | | | | ||||||
* | | | | Issue #24583: Fix crash when set is mutated while being updated. | Raymond Hettinger | 2015-07-16 | 1 | -5/+13 | |
| | | | | ||||||
* | | | | merge | Raymond Hettinger | 2015-07-16 | 1 | -1/+2 | |
|\ \ \ \ | |/ / / | ||||||
| * | | | Issue #24583: Fix crash when set is mutated while being updated. | Raymond Hettinger | 2015-07-16 | 1 | -1/+2 | |
| | | | | ||||||
| * | | | Reverting my previous commit. | Yury Selivanov | 2015-05-30 | 1 | -104/+41 | |
| | | | | | | | | | | | | | | | | Something went horribly wrong when I was doing `hg rebase`. | |||||
* | | | | Neaten-up a little bit. | Raymond Hettinger | 2015-07-08 | 1 | -3/+3 | |
| | | | | ||||||
* | | | | Issue 24581: Revert c9782a9ac031 pending a stronger test for mutation during ↵ | Raymond Hettinger | 2015-07-07 | 1 | -13/+22 | |
| | | | | | | | | | | | | | | | | iteration. | |||||
* | | | | Minor bit of factoring-out common code. | Raymond Hettinger | 2015-07-07 | 1 | -18/+11 | |
| | | | | ||||||
* | | | | Tighten-up code in the set iterator to use an entry pointer rather than ↵ | Raymond Hettinger | 2015-07-07 | 1 | -22/+13 | |
| | | | | | | | | | | | | | | | | indexing. | |||||
* | | | | Tighten-up code in set_next() to use an entry pointer rather than indexing. | Raymond Hettinger | 2015-07-06 | 1 | -5/+7 | |
| | | | | ||||||
* | | | | Bring related functions add/contains/discard together in the code. | Raymond Hettinger | 2015-07-05 | 1 | -40/+34 | |
| | | | | ||||||
* | | | | Change add/contains/discard calls to pass the key and hash instead of an ↵ | Raymond Hettinger | 2015-07-05 | 1 | -52/+42 | |
| | | | | | | | | | | | | | | | | entry struct. | |||||
* | | | | Clean-up call patterns for add/contains/discard to better match the caller's ↵ | Raymond Hettinger | 2015-07-05 | 1 | -36/+33 | |
| | | | | | | | | | | | | | | | | needs. | |||||
* | | | | Make the unicode equality test an external function rather than in-lining it. | Raymond Hettinger | 2015-07-04 | 1 | -5/+4 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||||
* | | | | Make sure the dummy percentage calculation won't overflow. | Raymond Hettinger | 2015-07-04 | 1 | -2/+2 | |
| | | | | ||||||
* | | | | Minor cleanup. | Raymond Hettinger | 2015-07-04 | 1 | -2/+2 | |
| | | | | ||||||
* | | | | Minor nit: Make the style of checking error return values more consistent. | Raymond Hettinger | 2015-07-04 | 1 | -16/+16 | |
| | | | | ||||||
* | | | | Minor factoring: move redundant resize scaling logic into the resize function. | Raymond Hettinger | 2015-07-04 | 1 | -4/+5 | |
| | | | | ||||||
* | | | | Call set_lookkey() directly to avoid unnecessary memory spills and reloads. | Raymond Hettinger | 2015-07-04 | 1 | -4/+5 | |
| | | | | ||||||
* | | | | Move insertion resize logic into set_insert_key(). | Raymond Hettinger | 2015-07-04 | 1 | -45/+24 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies the code a little bit and does the resize check only when a new key is added (giving a small speed up in the case where the key already exists). Fixes possible bug in set_merge() where the set_insert_key() call relies on a big resize at the start to make enough room for the keys but is vulnerable to a comparision callback that could cause the table to shrink in the middle of the merge. Also, changed the resize threshold from two-thirds of the mask+1 to just two-thirds. The plus one offset gave no real benefit (afterall, the two-thirds mark is just a heuristic and isn't a precise cut-off). | |||||
* | | | | Minor refactoring. Move reference count logic into function that adds entry. | Raymond Hettinger | 2015-06-28 | 1 | -14/+4 | |
| | | | | ||||||
* | | | | Minor tweeak to tighten the inner-loop. | Raymond Hettinger | 2015-06-26 | 1 | -1/+1 | |
| | | | | ||||||
* | | | | Minor code cleanup. | Raymond Hettinger | 2015-06-24 | 1 | -3/+5 | |
| | | | | ||||||
* | | | | Harmonize the bottom of the outer loop with its entry point | Raymond Hettinger | 2015-06-21 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | | | | | | giving a small simplification. Timings show that hash pre-check seems only benefit the inner-loop (the linear probes). | |||||
* | | | | Restore quick exit (no freeslot check) for common case (found null on first ↵ | Raymond Hettinger | 2015-06-21 | 1 | -1/+11 | |
|/ / / | | | | | | | | | | probe). | |||||
* | | | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(), | Serhiy Storchaka | 2015-05-30 | 1 | -4/+13 | |
|\ \ \ | | | | | | | | | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly. | |||||
| * \ \ | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(), | Serhiy Storchaka | 2015-05-30 | 1 | -4/+13 | |
| |\ \ \ | | |/ / | | | | | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly. | |||||
| | * | | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(), | Serhiy Storchaka | 2015-05-30 | 1 | -4/+13 | |
| | | | | | | | | | | | | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly. | |||||
* | | | | Issue #23359: Specialize set_lookkey intoa lookup function and an insert ↵ | Raymond Hettinger | 2015-05-27 | 1 | -41/+104 | |
|/ / / | | | | | | | | | | function. | |||||
* | | | Minor stylistic and consistency cleanup. | Raymond Hettinger | 2015-05-13 | 1 | -19/+19 | |
| | | | ||||||
* | | | Issue #23290: Optimize set_merge() for cases where the target is empty. | Raymond Hettinger | 2015-05-13 | 1 | -10/+40 | |
| | | | | | | | | | | | | (Contributed by Serhiy Storchaka.) | |||||
* | | | Mirco-optimizations to reduce register spills and reloads observed on CLANG ↵ | Raymond Hettinger | 2015-02-09 | 1 | -2/+4 | |
| | | | | | | | | | | | | and GCC. | |||||
* | | | Minor code clean up. | Raymond Hettinger | 2015-02-04 | 1 | -2/+2 | |
| | | | ||||||
* | | | Issue 23359: Reduce size of code in set_lookkey. Only do linear probes when ↵ | Raymond Hettinger | 2015-02-03 | 1 | -33/+0 | |
| | | | | | | | | | | | | | | | | | | there is no wrap-around. Nice simplification contributed by Serhiy Storchaka :-) | |||||
* | | | Issue 23359: Tighten inner search loop for sets (don't and-mask every entry ↵ | Raymond Hettinger | 2015-02-02 | 1 | -24/+53 | |
| | | | | | | | | | | | | lookup). | |||||
* | | | Keep the definition of i consistent between set_lookkey() and ↵ | Raymond Hettinger | 2015-01-31 | 1 | -4/+4 | |
| | | | | | | | | | | | | set_insert_clean(). | |||||
* | | | Minor tweak to improve code clarity. | Raymond Hettinger | 2015-01-31 | 1 | -1/+1 | |
| | | | ||||||
* | | | Fix typo in a comment. | Raymond Hettinger | 2015-01-31 | 1 | -1/+1 | |
| | | | ||||||
* | | | Revert unintended part of the commit (the key==dummy test wasn't supposed to ↵ | Raymond Hettinger | 2015-01-27 | 1 | -6/+2 | |
| | | | | | | | | | | | | change). |