]> granicus.if.org Git - python/commitdiff
Minor tweek. Counting down rather than up reduces register pressure.
authorRaymond Hettinger <python@rcn.com>
Tue, 15 Dec 2015 08:42:30 +0000 (00:42 -0800)
committerRaymond Hettinger <python@rcn.com>
Tue, 15 Dec 2015 08:42:30 +0000 (00:42 -0800)
Objects/setobject.c

index 4723b584b88eba5ad1403acb77667a43f34c30cb..45aa2007ac35a1b596ec9b88856587365ba9e818 100644 (file)
@@ -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);