From: Raymond Hettinger Date: Tue, 15 Dec 2015 08:42:30 +0000 (-0800) Subject: Minor tweek. Counting down rather than up reduces register pressure. X-Git-Tag: v3.6.0a1~907 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4495877dd08b4d0568bb8a75ae5c69b3d91ff60;p=python Minor tweek. Counting down rather than up reduces register pressure. --- diff --git a/Objects/setobject.c b/Objects/setobject.c index 4723b584b8..45aa2007ac 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -678,7 +678,7 @@ set_merge(PySetObject *so, PyObject *otherset) size_t newmask = (size_t)so->mask; so->fill = other->used; so->used = other->used; - for (i = 0; i <= other->mask; i++, other_entry++) { + for (i = other->mask + 1; i > 0 ; i--, other_entry++) { key = other_entry->key; if (key != NULL && key != dummy) { Py_INCREF(key);