[issue30040] new empty dict can be more small
Louie Lu
report at bugs.python.org
Sun Apr 16 23:13:36 EDT 2017
Louie Lu added the comment:
Inada's patch version act different inside `PyObject_SetItem`,
when running this code: 'x = {}; x['a'] = 123'
at PyObject_SetItem,
patch version goes to this line:
>│179 if (m && m->mp_ass_subscript)
│180 return m->mp_ass_subscript(o, key, value);
but original version goes to:
>│182 if (o->ob_type->tp_as_sequence) {
│183 if (PyIndex_Check(key)) {
I think that's why the performance issue came out, still digging why this happened.
----------
nosy: +louielu
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30040>
_______________________________________
More information about the Python-bugs-list
mailing list