summaryrefslogtreecommitdiffstats
path: root/Modules/_math.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2021-10-25 03:27:24 (GMT)
committerGitHub <noreply@github.com>2021-10-25 03:27:24 (GMT)
commit51ed2c56a1852cd6b09c85ba81312dc9782772ce (patch)
tree8d6cbd4b4a443e5be911579b6ff9f2d49ee65711 /Modules/_math.h
parent07236d562e59c6650227be18fa6ffc66b18d4741 (diff)
downloadcpython-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