This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author corona10
Recipients LCatro, corona10, methane, pablogsal, serhiy.storchaka
Date 2019-12-31.01:37:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1577756249.74.0.5812691796.issue38588@roundup.psfhosted.org>
In-reply-to
Content
Master
Mean +- std dev: 1.08 us +- 0.02 us

Before PR-17734
Mean +- std dev: 584 ns +- 12 ns

New suggested
.....................
Mean +- std dev: 578 ns +- 14 ns

diff --git a/Objects/object.c b/Objects/object.c
index 6fc1146..b42f41a 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -865,6 +865,8 @@ PyObject_RichCompareBool(PyObject *v, PyObject *w, int op)
             return 0;
     }

+    Py_INCREF(v);
+    Py_INCREF(w);
     res = PyObject_RichCompare(v, w, op);
     if (res == NULL)
         return -1;
@@ -873,6 +875,8 @@ PyObject_RichCompareBool(PyObject *v, PyObject *w, int op)
     else
         ok = PyObject_IsTrue(res);
     Py_DECREF(res);
+    Py_DECREF(v);
+    Py_DECREF(w);
     return ok;
 }
History
Date User Action Args
2019-12-31 01:37:29corona10setrecipients: + corona10, methane, serhiy.storchaka, LCatro, pablogsal
2019-12-31 01:37:29corona10setmessageid: <1577756249.74.0.5812691796.issue38588@roundup.psfhosted.org>
2019-12-31 01:37:29corona10linkissue38588 messages
2019-12-31 01:37:29corona10create