消息 [359023]
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;
} |
|
| 日期 |
用户 |
动作 |
参数 |
| 2019-12-30 07:33:20 | methane | 修改 | recipients:
+ methane, serhiy.storchaka, LCatro |
| 2019-12-30 07:33:20 | methane | 修改 | messageid: <1577691200.37.0.198564207536.issue38588@roundup.psfhosted.org> |
| 2019-12-30 07:33:20 | methane | 链接 | issue38588 messages |
| 2019-12-30 07:33:20 | methane | 创建 | |
|