[issue23601] use small object allocator for dict key storage
Mark Shannon
report at bugs.python.org
Sat Mar 7 21:03:00 CET 2015
Mark Shannon added the comment:
I don't remember why PyMem_Malloc rather than PyObject_MALLOC was used, it may have been inherited from the allocation of dict tables in the earlier implementation.
My only concern is that the benchmark only tests performance for very small dictionaries. The small object allocator is limited to 512 bytes before it falls back on malloc, so for larger dict keys the speed up would vanish.
A benchmark with a range of sizes would be more convincing, if only to show that it is no slower for larger dicts.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23601>
_______________________________________
More information about the Python-bugs-list
mailing list