bpo-45530: speed listobject.c's unsafe_tuple_compare() (GH-29076)
Keep track of whether unsafe_tuple_compare() calls are resolved by the very first tuple elements, and adjust strategy accordingly. This can significantly cut the number of calls made to the full-blown PyObject_RichCompareBool(), and especially when duplicates are rare. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
T
Tim Peters committed
51ed2c56a1852cd6b09c85ba81312dc9782772ce
Parent: 07236d5
Committed by GitHub <noreply@github.com>
on 10/25/2021, 3:27:24 AM