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 methane
Recipients LCatro, methane, serhiy.storchaka
Date 2019-12-30.07:33:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1577691200.37.0.198564207536.issue38588@roundup.psfhosted.org>
In-reply-to
Content
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;
    }
History
Date User Action Args
2019-12-30 07:33:20methanesetrecipients: + methane, serhiy.storchaka, LCatro
2019-12-30 07:33:20methanesetmessageid: <1577691200.37.0.198564207536.issue38588@roundup.psfhosted.org>
2019-12-30 07:33:20methanelinkissue38588 messages
2019-12-30 07:33:20methanecreate