Message359023
Would you benchmark the performance?
How about calling Py_INCREF and Py_DECREF in PyObject_RichCompare or do_richcompare?
It is safer than checking all caller of the PyObject_RichCompare and PyObject_RichCompareBool.
And it would be faster when PyObject_RichCompareBool is called with v == w and op == Py_EQ.
/* Quick result when objects are the same.
Guarantees that identity implies equality. */
if (v == w) {
if (op == Py_EQ)
return 1;
else if (op == Py_NE)
return 0;
} |
|
Date |
User |
Action |
Args |
2019-12-30 07:33:20 | methane | set | recipients:
+ methane, serhiy.storchaka, LCatro |
2019-12-30 07:33:20 | methane | set | messageid: <1577691200.37.0.198564207536.issue38588@roundup.psfhosted.org> |
2019-12-30 07:33:20 | methane | link | issue38588 messages |
2019-12-30 07:33:20 | methane | create | |
|