Serhiy Storchaka
67796521dd
Issue #28969 : Fixed race condition in C implementation of functools.lru_cache.
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
10 years ago
Antoine Pitrou
e10ca3a0fe
Issue #28427 : old keys should not remove new values from
WeakValueDictionary when collecting from another thread.
10 years ago
INADA Naoki
6165d55f13
Issue #28147 : Fix a memory leak in split-table dictionaries
setattr() must not convert combined table into split table.
10 years ago
Victor Stinner
ccda5c41df
Fix a memory leak in split-table dictionaries
Issue #28147 : Fix a memory leak in split-table dictionaries: setattr() must not
convert combined table into split table.
Patch written by INADA Naoki.
(grafted from 85be9dcc16 )
10 years ago
Victor Stinner
3d3f264849
Fix a memory leak in split-table dictionaries
Issue #28147 : Fix a memory leak in split-table dictionaries: setattr() must not
convert combined table into split table.
Patch written by INADA Naoki.
10 years ago
INADA Naoki
ba6097734d
Issue #28818 : Simplify lookdict functions
10 years ago
INADA Naoki
2c5a830f2a
Issue #28731 : Optimize _PyDict_NewPresized() to create correct size dict.
Improve speed of dict literal with constant keys up to 30%.
10 years ago
Victor Stinner
a5ed5f000a
Use _PyObject_CallNoArg()
Replace:
PyObject_CallObject(callable, NULL)
with:
_PyObject_CallNoArg(callable)
10 years ago
Victor Stinner
de4ae3d486
Backed out changeset b9c9691c72c5
Issue #28858 : The change b9c9691c72c5 introduced a regression. It seems like
_PyObject_CallArg1() uses more stack memory than
PyObject_CallFunctionObjArgs().
10 years ago
Victor Stinner
27580c1fb5
Replace PyObject_CallFunctionObjArgs() with fastcall
* 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 .
10 years ago
INADA Naoki
92c50eee52
Issue #28731 : Optimize _PyDict_NewPresized() to create correct size dict
Improve speed of dict literal with constant keys up to 30%.
10 years ago
Victor Stinner
c7a8f67411
Issue #28618 : Mark dict lookup functions as hot
It's common to see these functions in the top 3 of "perf report".
10 years ago
Victor Stinner
0cae609847
Use PyThreadState_GET() in performance critical code
It seems like _PyThreadState_UncheckedGet() is not inlined as expected, even
when using gcc -O3.
10 years ago
Serhiy Storchaka
f0b311bd73
Issue #28123 : _PyDict_GetItem_KnownHash() now can raise an exception as
PyDict_GetItemWithError(). Patch by Xiang Zhang.
10 years ago
INADA Naoki
93f26f794d
Issue #28583 : PyDict_SetDefault didn't combine split table when needed.
Patch by Xiang Zhang.
10 years ago
Serhiy Storchaka
7f0514ad54
Backed out changeset 6b88dfc7b25d
10 years ago
Serhiy Storchaka
e26e20db95
Issue #28199 : Microoptimized dict resizing. Based on patch by Naoki Inada.
10 years ago
INADA Naoki
ca2d8be4ba
Issue #28580 : Optimize iterating split table values.
Patch by Xiang Zhang.
10 years ago
Serhiy Storchaka
d76d8bfee1
Issue #28199 : Microoptimized dict resizing. Based on patch by Naoki Inada.
10 years ago
Yury Selivanov
684ef2c888
Issue #28544 : Pass `PyObject*` to _PyDict_Pop, not `PyDictObject*`
10 years ago
INADA Naoki
b1152be2de
Issue #28509 : dict.update() no longer allocate unnecessary large memory
10 years ago
Raymond Hettinger
b12785d456
Reference the original compact-and-ordered proposal
10 years ago
doko@ubuntu.com
de69ee71e2
- dictobject.c: Make dict_merge symbol a static symbol
10 years ago
doko@ubuntu.com
c96df68ea3
- dictobject.c: Make dict_merge symbol a static symbol
10 years ago
Serhiy Storchaka
49f5cdde1a
Issue #28183 : Optimize and cleanup dict iteration.
10 years ago
INADA Naoki
267941c675
Issue #28201 : Dict reduces possibility of 2nd conflict in hash table.
Do perturb shift after first conflict.
10 years ago
Serhiy Storchaka
e036ef8fa2
Issue #27358 : Optimized merging var-keyword arguments and improved error
message when pass a non-mapping as a var-keyword argument.
10 years ago
Serhiy Storchaka
97932e4c4f
issue #28144 : Decrease empty_keys_struct's dk_refcnt
since there is no dummy_struct any more.
Patch by Xiang Zhang.
10 years ago
Serhiy Storchaka
46825d2399
Issue #28194 : Clean up some checks in dict implementation.
Patch by Xiang Zhang.
10 years ago
Raymond Hettinger
6692f01c91
merge
10 years ago
Raymond Hettinger
7eb1becc25
Issue #28189 : dictitems_contains no longer swallows compare errors.
(Patch by Xiang Zhang)
10 years ago
Victor Stinner
611b0fa94c
Add _PyDict_CheckConsistency()
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".
10 years ago
Victor Stinner
d0ad11f6b4
Fix _PyDict_Pop() on pending key
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.
10 years ago
Victor Stinner
9926480b6a
Issue #28040 : Cleanup find_empty_slot()
find_empty_slot() only supports combined dict
10 years ago
Victor Stinner
74822c15b3
Issue #28040 : Cleanup find_empty_slot()
find_empty_slot() only supports combined dict
10 years ago
Victor Stinner
3c336c5915
Issue #28077 : find_empty_slot() only supports combined dict
10 years ago
Serhiy Storchaka
473e0e4dba
Fixed compiler warnings in compact dict implementation on 32-bit platforms.
10 years ago
Victor Stinner
990397ef1e
dictobject.c: explain why stringlib is used
10 years ago
Victor Stinner
78601a38c2
Fix SystemError in compact dict
Issue #28040 : Fix _PyDict_DelItem_KnownHash() and _PyDict_Pop(): convert
splitted table to combined table to be able to delete the item.
Write an unit test for the issue.
Patch by INADA Naoki.
10 years ago
Berker Peksag
71c01d43a7
Issue #28033 : Fix typo in dictobject.c
Patch by Wesley Emeneker.
10 years ago
Benjamin Peterson
3c569295d6
do not worry about 64-bit dict sizes on 32-bit platforms
10 years ago
Victor Stinner
3b6a6b4215
Add a new private version to the builtin dict type
Issue #26058 : Add a new private version to the builtin dict type, incremented
at each dictionary creation and at each dictionary change.
Implementation of the PEP 509.
10 years ago
Benjamin Peterson
186122ead2
access dk_indices through a union
10 years ago
Victor Stinner
a4348cc1be
Add documentation to the dict implementation
Issue #27350 .
10 years ago
Victor Stinner
58f7c5a955
Reindeint DK_xxx macros
Issue #27350 .
10 years ago
Victor Stinner
208857ec33
dk_get_index/dk_set_index uses a type indices variable
Issue #27350 .
10 years ago
Victor Stinner
dee6e252cc
Split lookdict_unicode_nodummy() assertion to debug
Issue #27350 .
10 years ago
Victor Stinner
71211e3386
Add assertions to dk_set_index()
Issue #27350 .
10 years ago
Benjamin Peterson
003f059b3a
link to canonical blogspot
10 years ago
Benjamin Peterson
7322225a57
use native inline instead of Py_LOCAL_INLINE
10 years ago