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 <rep...@bugs.python.org>
<http://bugs.python.org/issue23601>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to