summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPieter Eendebak <pieter.eendebak@gmail.com>2023-01-21 19:33:08 (GMT)
committerGitHub <noreply@github.com>2023-01-21 19:33:08 (GMT)
commitf63f525e161204970418ebc132efc542daaa24ed (patch)
tree9b3e30f087e490184d19d07a7a1b745430357035 /Lib
parentb4e11a7985a3bc116596c63d1e5f8bbd653041b9 (diff)
downloadcpython-f63f525e161204970418ebc132efc542daaa24ed.zip
cpython-f63f525e161204970418ebc132efc542daaa24ed.tar.gz
cpython-f63f525e161204970418ebc132efc542daaa24ed.tar.bz2
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>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_range.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_range.py b/Lib/test/test_range.py
index 7be76b3..3870b15 100644
--- a/Lib/test/test_range.py
+++ b/Lib/test/test_range.py
@@ -542,6 +542,7 @@ class RangeTest(unittest.TestCase):
for start in limits
for end in limits
for step in (-2**63, -2**31, -2, -1, 1, 2)]
+ test_ranges += [(-2**63, 2**63-2, 1)] # regression test for gh-100810
for start, end, step in test_ranges:
iter1 = range(start, end, step)