Commit d09b8a48 authored by Raymond Hettinger's avatar Raymond Hettinger

Code simplification -- eliminate lookup when value is known in advance.

parent 80536543
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment