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 Stefan Pochmann
Recipients Stefan Pochmann, rhettinger, tim.peters
Date 2021-10-20.10:03:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634724218.1.0.242114999385.issue45530@roundup.psfhosted.org>
In-reply-to
Content
Hmm. What do you think about using "<" inside the loop for the remaining tuple elements as well? It's even less likely that both the first and the second elements are equal.

When the second elements differ, this saves 0.5 PyObject_RichCompareBool (average 1.5 "<" instead of one "==" and one "<").

When the second elements are equal, this costs 1 PyObject_RichCompareBool more (two "<" instead of one "==").

That's fewer PyObject_RichCompareBool calls if they're equal less than 1/3 of the time.
History
Date User Action Args
2021-10-20 10:03:38Stefan Pochmannsetrecipients: + Stefan Pochmann, tim.peters, rhettinger
2021-10-20 10:03:38Stefan Pochmannsetmessageid: <1634724218.1.0.242114999385.issue45530@roundup.psfhosted.org>
2021-10-20 10:03:38Stefan Pochmannlinkissue45530 messages
2021-10-20 10:03:38Stefan Pochmanncreate