You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move Modules/hashtable.h to Include/internal/pycore_hashtable.h #84782
Attached PR implements this change but also changes the default memory allocator to PyMem_Malloc/PyMem_Free which is faster than PyMem_RawMalloc/PyMem_RawFree (current default) for memory blocks <= 512 bytes.
It remains an internal C API which cannot be used outside CPython.
Activity
vstinner commentedon May 12, 2020
Python/mashal.c uses Modules/hashtable.h.
Python/mashal.c indirectly gets Modules/hashtable.c implementation via Modules/_tracemalloc.c which is built as a builtin module.
I propose to make the "hashtable" more standard:
Attached PR implements this change but also changes the default memory allocator to PyMem_Malloc/PyMem_Free which is faster than PyMem_RawMalloc/PyMem_RawFree (current default) for memory blocks <= 512 bytes.
It remains an internal C API which cannot be used outside CPython.
vstinner commentedon May 12, 2020
New changeset b617993 by Victor Stinner in branch 'master':
bpo-40602: Rename hashtable.h to pycore_hashtable.h (GH-20044)
b617993
vstinner commentedon May 12, 2020
New changeset d0919f0 by Victor Stinner in branch 'master':
bpo-40602: _Py_hashtable_new() uses PyMem_Malloc() (GH-20046)
d0919f0
vstinner commentedon May 12, 2020
New changeset 7c6e970 by Victor Stinner in branch 'master':
bpo-40602: Optimize _Py_hashtable for pointer keys (GH-20051)
7c6e970
vstinner commentedon May 12, 2020
New changeset f453221 by Victor Stinner in branch 'master':
bpo-40602: Add _Py_HashPointerRaw() function (GH-20056)
f453221
vstinner commentedon May 13, 2020
See also bpo-40609: "_tracemalloc: remove pointer_t type".
vstinner commentedon May 13, 2020
New changeset 42bae3a by Victor Stinner in branch 'master':
bpo-40602: Optimize _Py_hashtable_get_ptr() (GH-20066)
42bae3a
vstinner commentedon May 14, 2020
New changeset a482dc5 by Victor Stinner in branch 'master':
bpo-40602: Write unit tests for _Py_hashtable_t (GH-20091)
a482dc5
vstinner commentedon May 14, 2020
New changeset d2dc827 by Victor Stinner in branch 'master':
bpo-40602: _Py_hashtable_set() reports rehash failure (GH-20077)
d2dc827