mirror of https://github.com/python/cpython.git
Code simplification -- eliminate lookup when value is known in advance.
This commit is contained in:
parent
f7bf02ded5
commit
07ead17318
|
@ -400,8 +400,10 @@ insertdict(register dictobject *mp, PyObject *key, long hash, PyObject *value)
|
|||
else {
|
||||
if (ep->me_key == NULL)
|
||||
mp->ma_fill++;
|
||||
else
|
||||
Py_DECREF(ep->me_key);
|
||||
else {
|
||||
assert(ep->me_key == dummy);
|
||||
Py_DECREF(dummy);
|
||||
}
|
||||
ep->me_key = key;
|
||||
ep->me_hash = hash;
|
||||
ep->me_value = value;
|
||||
|
|
Loading…
Reference in New Issue