Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue 18771: Make it possible to set the number linear probes at compile-time. | Raymond Hettinger | 2013-09-15 | 1 | -5/+19 |
| | |||||
* | Put the defines in the logical section and fix indentation. | Raymond Hettinger | 2013-09-08 | 1 | -8/+8 |
| | |||||
* | Minor code beautification. | Raymond Hettinger | 2013-09-08 | 1 | -6/+5 |
| | |||||
* | Improve code clarity by removing two unattractive macros. | Raymond Hettinger | 2013-09-08 | 1 | -16/+18 |
| | |||||
* | Remove the freelist scheme for setobjects. | Raymond Hettinger | 2013-09-08 | 2 | -48/+8 |
| | | | | | | | | | The setobject freelist was consuming memory but not providing much value. Even when a freelisted setobject was available, most of the setobject fields still needed to be initialized and the small table still required a memset(). This meant that the custom freelisting scheme for sets was providing almost no incremental benefit over the default Python freelist scheme used by _PyObject_Malloc() in Objects/obmalloc.c. | ||||
* | Small rearrangement to bring together the three functions for probing the ↵ | Raymond Hettinger | 2013-09-08 | 1 | -32/+39 |
| | | | | hash table. | ||||
* | Move the overview comment to the top of the file. | Raymond Hettinger | 2013-09-07 | 1 | -22/+20 |
| | |||||
* | Nerge 3.3 into default. | Tim Peters | 2013-09-06 | 1 | -1/+1 |
|\ | | | | | | | | | | | | | | | Issue #18942: sys._debugmallocstats() output was damaged on Windows. _PyDebugAllocatorStats() called PyOS_snprintf() with a %zd format code, but MS doesn't support that code. Interpolated PY_FORMAT_SIZE_T in place of the "z". | ||||
| * | Issue #18942: sys._debugmallocstats() output was damaged on Windows. | Tim Peters | 2013-09-06 | 1 | -1/+1 |
| | | | | | | | | | | | | _PyDebugAllocatorStats() called PyOS_snprintf() with a %zd format code, but MS doesn't support that code. Interpolated PY_FORMAT_SIZE_T in place of the "z". | ||||
* | | Minor touchups. | Raymond Hettinger | 2013-09-02 | 1 | -4/+6 |
| | | |||||
* | | Factor-out the common code for setting a KeyError. | Raymond Hettinger | 2013-09-02 | 2 | -33/+5 |
| | | |||||
* | | Instead of XORed indicies, switch to a hybrid of linear probing and open ↵ | Raymond Hettinger | 2013-09-02 | 1 | -91/+68 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | addressing. Modern processors tend to make consecutive memory accesses cheaper than random probes into memory. Small sets can fit into L1 cache, so they get less benefit. But they do come out ahead because the consecutive probes don't probe the same key more than once and because the randomization step occurs less frequently (or not at all). For the open addressing step, putting the perturb shift before the index calculation gets the upper bits into play sooner. | ||||
* | | Update copyright. | Raymond Hettinger | 2013-09-01 | 1 | -1/+1 |
| | | |||||
* | | Further reduce the cost of hash collisions by inspecting an additional ↵ | Raymond Hettinger | 2013-09-01 | 1 | -4/+39 |
| | | | | | | | | nearby entry. | ||||
* | | Close #18780: %-formatting now prints value for int subclasses with %d, %i, ↵ | Ethan Furman | 2013-08-31 | 1 | -5/+3 |
| | | | | | | | | and %u codes. | ||||
* | | Tighten-up the lookkey() logic and beautify the code a bit. | Raymond Hettinger | 2013-08-29 | 1 | -88/+43 |
| | | | | | | | | | | | | | | Use less code by moving many of the steps from the initial lookup into the main search loop. Beautify the code but keep the overall logic unchanged. | ||||
* | | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 5 | -61/+60 |
|\ \ | |/ | | | | | error messages and comments. | ||||
| * | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 5 | -61/+60 |
| | | | | | | | | error messages and comments. | ||||
* | | Restore changeset 5bd9db528aed (issue #18408) | Victor Stinner | 2013-08-26 | 2 | -0/+22 |
| | | | | | | | | | | | | | | | | "Issue #18408: PyObject_Str(), PyObject_Repr() and type_call() now fail with an assertion error if they are called with an exception set (PyErr_Occurred()). As PyEval_EvalFrameEx(), they may clear the current exception and so the caller looses its exception." | ||||
* | | Issue #18408: _PyObject_Dump() now saves/restores the current exception | Victor Stinner | 2013-08-26 | 1 | -0/+6 |
| | | | | | | | | So it can be called even if an exception was raised | ||||
* | | Various clarifications based on feedback & questions over the years. | Tim Peters | 2013-08-24 | 1 | -19/+96 |
|\ \ | |/ | |||||
| * | Various clarifications based on feedback & questions over the years. | Tim Peters | 2013-08-24 | 1 | -19/+96 |
| | | | | | | | | (grafted from 23181bf411a16287a0a54e910fc0f9ecd2764bf0) | ||||
* | | Issue #18772: fix the gdb plugin after the set implementation changes | Antoine Pitrou | 2013-08-24 | 2 | -9/+3 |
| | | |||||
* | | Back out 5bd9db528aed (issue #18408). It caused unsolved buildbot failures. | Antoine Pitrou | 2013-08-23 | 2 | -23/+0 |
| | | |||||
* | | Add the same dummy type that is used in dictionaries. | Raymond Hettinger | 2013-08-23 | 1 | -15/+49 |
| | | |||||
* | | Add line explaining the "%sort" test. | Tim Peters | 2013-08-22 | 1 | -0/+1 |
|\ \ | |/ | |||||
| * | Add line explaining the "%sort" test. | Tim Peters | 2013-08-22 | 1 | -0/+1 |
| | | | | | | | | (grafted from 1ea833ecaf5a9d43a886e9e73b4e2551d0d5b548) | ||||
* | | Issue 18797: Remove unneeded refcount adjustments for dummy objects. | Raymond Hettinger | 2013-08-22 | 1 | -16/+6 |
| | | | | | | | | It suffices to keep just one reference when the object is created. | ||||
* | | Hoist the global dummy lookup out of the inner loop for set_merge(). | Raymond Hettinger | 2013-08-21 | 1 | -1/+3 |
| | | |||||
* | | Remove a redundant hash table probe (this was artifact from an earlier draft ↵ | Raymond Hettinger | 2013-08-21 | 1 | -11/+0 |
| | | | | | | | | of the patch). | ||||
* | | Issue 18772: Restore set dummy object back to unicode and restore the ↵ | Raymond Hettinger | 2013-08-21 | 1 | -4/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | identity checks in lookkey(). The Gdb prettyprint plugin depended on the dummy object being displayable. Other solutions besides a unicode object are possible. For now, get it back up and running. The identity checks in lookkey() need to be there to prevent the dummy object from leaking through Py_RichCompareBool() into user code in the rare circumstance where the dummy's hash value exactly matches the hash value of the actual key being looked up. | ||||
* | | Issue18771: Reduce the cost of hash collisions for set objects. | Raymond Hettinger | 2013-08-19 | 1 | -20/+86 |
| | | |||||
* | | Remove the else-clause because the conditions are no longer mutually exclusive. | Raymond Hettinger | 2013-08-17 | 1 | -1/+1 |
| | | |||||
* | | Use a known unique object for the dummy entry. | Raymond Hettinger | 2013-08-17 | 1 | -25/+20 |
| | | | | | | | | | | This lets us run PyObject_RichCompareBool() without first needing to check whether the entry is a dummy. | ||||
* | | Issue #18701: Remove support of old CPython versions (<3.0) from C code. | Serhiy Storchaka | 2013-08-16 | 1 | -5/+0 |
| | | |||||
* | | Hoist the global "dummy" lookup outside of the reinsertion loop. | Raymond Hettinger | 2013-08-15 | 1 | -1/+3 |
| | | |||||
* | | merge | Raymond Hettinger | 2013-08-14 | 1 | -9/+0 |
|\ \ | |/ | |||||
| * | Issue 18719: Remove a false optimization | Raymond Hettinger | 2013-08-14 | 1 | -9/+0 |
| | | | | | | | | | | | | | | | | | | | | Remove an unused early-out test from the critical path for dict and set lookups. When the strings already have matching lengths, kinds, and hashes, there is no additional information gained by checking the first characters (the probability of a mismatch is already known to be less than 1 in 2**64). | ||||
| * | Silence compiler warning for an unused declaration | Raymond Hettinger | 2013-08-04 | 1 | -1/+0 |
| | | |||||
* | | Issue #18722: Remove uses of the "register" keyword in C code. | Antoine Pitrou | 2013-08-13 | 20 | -196/+196 |
| | | |||||
* | | Replace outdated optimization with clearer code that compiles better. | Raymond Hettinger | 2013-08-06 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Letting the compiler decide how to optimize the multiply by five gives it the freedom to make better choices for the best technique for a given target machine. For example, GCC on x86_64 produces a little bit better code: Old-way (3 steps with a data dependency between each step): shrq $5, %r13 leaq 1(%rbx,%r13), %rax leaq (%rax,%rbx,4), %rbx New-way (3 steps with no dependency between the first two steps which can be run in parallel): leaq (%rbx,%rbx,4), %rax # i*5 shrq $5, %r13 # perturb >>= PERTURB_SHIFT leaq 1(%r13,%rax), %rbx # 1 + perturb + i*5 | ||||
* | | Issue #17934: Add a clear() method to frame objects, to help clean up ↵ | Antoine Pitrou | 2013-08-05 | 2 | -5/+31 |
| | | | | | | | | expensive details (local variables) and break reference cycles. | ||||
* | | merge | Raymond Hettinger | 2013-08-04 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Silence compiler warning about an uninitialized variable | Raymond Hettinger | 2013-08-04 | 1 | -1/+1 |
| | | |||||
* | | Issue #16741: Fix an error reporting in int(). | Serhiy Storchaka | 2013-08-03 | 2 | -52/+64 |
|\ \ | |/ | |||||
| * | Issue #16741: Fix an error reporting in int(). | Serhiy Storchaka | 2013-08-03 | 2 | -51/+67 |
| | | |||||
* | | Minor consistency fixes for some longobject.c exception messages: | Mark Dickinson | 2013-08-03 | 1 | -4/+4 |
| | | | | | | | | | | | | - replace 'long int' / 'long' by 'int' - fix capitalization of "Python" in PyLong_AsUnsignedLong - "is too large" -> "too large", for consistency with other messages. | ||||
* | | Issue #18214: Improve finalization of Python modules to avoid setting their ↵ | Antoine Pitrou | 2013-07-31 | 1 | -8/+21 |
| | | | | | | | | globals to None, in most cases. | ||||
* | | Issue #18112: PEP 442 implementation (safe object finalization). | Antoine Pitrou | 2013-07-30 | 3 | -123/+147 |
| | | |||||
* | | Issue #18520: Fix _PyDict_GetItemId(), suppress _PyUnicode_FromId() error | Victor Stinner | 2013-07-22 | 1 | -1/+3 |
| | | | | | | | | | | As PyDict_GetItem(), _PyDict_GetItemId() suppresses all errors that may occur, for historical reasons. |