summaryrefslogtreecommitdiff
path: root/Objects/dictobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #29311: Regenerate Argument Clinic.Serhiy Storchaka2017-02-041-1/+1
|
* Issues #29311, #29289: Fixed and improved docstrings for dict and OrderedDictSerhiy Storchaka2017-01-251-8/+10
| | | | methods.
* Issue #29311: Argument Clinic generates reasonable name for the parameter ↵Serhiy Storchaka2017-01-191-8/+9
| | | | "default".
* Add a note explaining why dict_update() doesn't use METH_FASTCALLVictor Stinner2017-01-191-0/+3
| | | | Issue #29312.
* dict.get() and dict.setdefault() now use ACVictor Stinner2017-01-191-24/+29
| | | | | | | | | | | Issue #29311: dict.get() and dict.setdefault() methods now use Argument Clinic to parse arguments. Their calling convention changes from METH_VARARGS to METH_FASTCALL which avoids the creation of a temporary tuple. The signature of docstrings is also enhanced. For example, get(...) becomes: get(self, key, default=None, /)
* Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-8/+23
|\ | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
| * Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-711/+1157
| |\ | | | | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
| * | Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-8/+23
| | | | | | | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
* | | Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-237/+202
|\ \ \ | |_|/ |/| | | | | WeakValueDictionary when collecting from another thread.
| * | Merge 3.6Victor Stinner2016-12-151-5/+22
| |\ \
| * | | Issue #28818: Simplify lookdict functionsINADA Naoki2016-12-071-122/+94
| | | |
| * | | Use _PyObject_CallNoArg()Victor Stinner2016-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace: PyObject_CallObject(callable, NULL) with: _PyObject_CallNoArg(callable)
| * | | Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
| * | | Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507.
| * | | Issue #28731: Optimize _PyDict_NewPresized() to create correct size dictINADA Naoki2016-11-221-5/+19
| | | | | | | | | | | | | | | | Improve speed of dict literal with constant keys up to 30%.
| * | | Issue #28618: Mark dict lookup functions as hotVictor Stinner2016-11-151-4/+4
| | | | | | | | | | | | | | | | It's common to see these functions in the top 3 of "perf report".
| * | | Use PyThreadState_GET() in performance critical codeVictor Stinner2016-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | It seems like _PyThreadState_UncheckedGet() is not inlined as expected, even when using gcc -O3.
| * | | Issue #28199: Microoptimized dict resizing. Based on patch by Naoki Inada.Serhiy Storchaka2016-10-291-60/+63
| | | |
| * | | Issue #28123: _PyDict_GetItem_KnownHash() now can raise an exception asSerhiy Storchaka2016-11-061-39/+28
| |\ \ \ | | | | | | | | | | | | | | | PyDict_GetItemWithError(). Patch by Xiang Zhang.
| | * | | Issue #28580: Optimize iterating split table values.INADA Naoki2016-11-041-37/+25
| | | | | | | | | | | | | | | | | | | | Patch by Xiang Zhang.
| | * | | Issue #28583: PyDict_SetDefault didn't combine split table when needed.INADA Naoki2016-11-021-15/+45
| | |\ \ \ | | | | | | | | | | | | | | | | | | Patch by Xiang Zhang.
| | * \ \ \ Merge from 3.6.Serhiy Storchaka2016-10-311-2/+3
| | |\ \ \ \
| | | * \ \ \ Issue #28199: Microoptimized dict resizing. Based on patch by Naoki Inada.Serhiy Storchaka2016-10-291-2/+3
| | | |\ \ \ \
| | | | * \ \ \ Merge 3.6 (issue #28544)Yury Selivanov2016-10-281-2/+3
| | | | |\ \ \ \
| | | | | * \ \ \ Issue #28509: dict.update() no longer allocate unnecessary large memoryINADA Naoki2016-10-271-2/+3
| | | | | |\ \ \ \
| | | | | | * | | | Reference the original compact-and-ordered proposalRaymond Hettinger2016-10-221-2/+3
| | | | | | | | | |
* | | | | | | | | | Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-17/+74
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ / |/| | | | | | | | / | | |_|_|_|_|_|_|/ | |/| | | | | | | WeakValueDictionary when collecting from another thread.
| * | | | | | | | Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-25/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WeakValueDictionary when collecting from another thread.
| * | | | | | | | Issue #28147: Fix a memory leak in split-table dictionariesINADA Naoki2016-12-201-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setattr() must not convert combined table into split table.
| * | | | | | | | Issue #28189: dictitems_contains no longer swallows compare errors.Raymond Hettinger2016-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Patch by Xiang Zhang)
* | | | | | | | | Fix a memory leak in split-table dictionariesVictor Stinner2016-12-151-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #28147: Fix a memory leak in split-table dictionaries: setattr() must not convert combined table into split table. Patch written by INADA Naoki.
* | | | | | | | | Issue #28731: Optimize _PyDict_NewPresized() to create correct size dict.INADA Naoki2016-12-071-5/+19
| |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | Improve speed of dict literal with constant keys up to 30%.
* | | | | | | | Issue #28123: _PyDict_GetItem_KnownHash() now can raise an exception asSerhiy Storchaka2016-11-061-26/+22
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | PyDict_GetItemWithError(). Patch by Xiang Zhang.
* | | | | | | Issue #28583: PyDict_SetDefault didn't combine split table when needed.INADA Naoki2016-11-021-15/+45
| |/ / / / / |/| | | | | | | | | | | | | | | | | Patch by Xiang Zhang.
* | | | | | Backed out changeset 6b88dfc7b25dSerhiy Storchaka2016-10-311-63/+60
| |/ / / / |/| | | |
* | | | | Issue #28199: Microoptimized dict resizing. Based on patch by Naoki Inada.Serhiy Storchaka2016-10-291-60/+63
| |/ / / |/| | |
* | | | Issue #28544: Pass `PyObject*` to _PyDict_Pop, not `PyDictObject*`Yury Selivanov2016-10-281-2/+6
| |/ / |/| |
* | | Issue #28509: dict.update() no longer allocate unnecessary large memoryINADA Naoki2016-10-271-2/+4
| |/ |/|
* | - dictobject.c: Make dict_merge symbol a static symboldoko2016-10-111-1/+1
| |
* | Issue #28183: Optimize and cleanup dict iteration.Serhiy Storchaka2016-10-091-109/+106
| |
* | Issue #28201: Dict reduces possibility of 2nd conflict in hash table.INADA Naoki2016-10-061-16/+22
| | | | | | | | Do perturb shift after first conflict.
* | Issue #27358: Optimized merging var-keyword arguments and improved errorSerhiy Storchaka2016-10-021-9/+36
| | | | | | | | message when pass a non-mapping as a var-keyword argument.
* | issue #28144: Decrease empty_keys_struct's dk_refcntSerhiy Storchaka2016-09-261-1/+1
| | | | | | | | | | since there is no dummy_struct any more. Patch by Xiang Zhang.
* | Issue #28194: Clean up some checks in dict implementation.Serhiy Storchaka2016-09-261-10/+11
| | | | | | | | Patch by Xiang Zhang.
* | mergeRaymond Hettinger2016-09-181-1/+1
| |
* | Add _PyDict_CheckConsistency()Victor Stinner2016-09-141-2/+88
| | | | | | | | | | | | | | | | Issue #28127: Add a function to check that a dictionary remains consistent after any change. By default, tables are not checked, only basic attributes. Define DEBUG_PYDICT (ex: gcc -D DEBUG_PYDICT) to also check dictionary "content".
* | Fix _PyDict_Pop() on pending keyVictor Stinner2016-09-131-1/+1
| | | | | | | | | | | | | | Issue #28120: Fix dict.pop() for splitted dictionary when trying to remove a "pending key" (Not yet inserted in split-table). Patch by Xiang Zhang.
* | Issue #28040: Cleanup find_empty_slot()Victor Stinner2016-09-131-6/+2
| | | | | | | | find_empty_slot() only supports combined dict
* | Issue #28077: find_empty_slot() only supports combined dictVictor Stinner2016-09-121-3/+7
| |
* | Fixed compiler warnings in compact dict implementation on 32-bit platforms.Serhiy Storchaka2016-09-101-11/+11
| |