diff options
author | Tim Peters <tim.peters@gmail.com> | 2021-10-25 03:27:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 03:27:24 (GMT) |
commit | 51ed2c56a1852cd6b09c85ba81312dc9782772ce (patch) | |
tree | 8d6cbd4b4a443e5be911579b6ff9f2d49ee65711 /Modules/_math.h | |
parent | 07236d562e59c6650227be18fa6ffc66b18d4741 (diff) | |
download | cpython-51ed2c56a1852cd6b09c85ba81312dc9782772ce.zip cpython-51ed2c56a1852cd6b09c85ba81312dc9782772ce.tar.gz cpython-51ed2c56a1852cd6b09c85ba81312dc9782772ce.tar.bz2 |
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>
Diffstat (limited to 'Modules/_math.h')
0 files changed, 0 insertions, 0 deletions