Dong-hee Na <donghee.n...@gmail.com> added the comment:
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; } ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38588> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com