]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-100726: Optimize construction of range object for medium sized integers (#100810)
authorPieter Eendebak <pieter.eendebak@gmail.com>
Sat, 21 Jan 2023 19:33:08 +0000 (20:33 +0100)
committerGitHub <noreply@github.com>
Sat, 21 Jan 2023 19:33:08 +0000 (19:33 +0000)
commitf63f525e161204970418ebc132efc542daaa24ed
tree9b3e30f087e490184d19d07a7a1b745430357035
parentb4e11a7985a3bc116596c63d1e5f8bbd653041b9
gh-100726: Optimize construction of range object for medium sized integers (#100810)

Use C long arithmetic instead of PyLong arithmetic to compute the range length, where possible.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Lib/test/test_range.py
Misc/NEWS.d/next/Core and Builtins/2023-01-03-20-59-20.gh-issue-100726.W9huFl.rst [new file with mode: 0644]
Objects/rangeobject.c