diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2021-02-05 05:36:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 05:36:03 (GMT) |
commit | d9dda32040f2c664321e3f9c189154e93726e397 (patch) | |
tree | c20bd6e89631ee0647b65c08bf6baf9b1fd34aa0 /Lib/random.py | |
parent | d938816acf71a74f1bd13fdf0534b3d9ea962e44 (diff) | |
download | cpython-d9dda32040f2c664321e3f9c189154e93726e397.zip cpython-d9dda32040f2c664321e3f9c189154e93726e397.tar.gz cpython-d9dda32040f2c664321e3f9c189154e93726e397.tar.bz2 |
Reduce overhead on random timings (GH-24455)
Diffstat (limited to 'Lib/random.py')
-rw-r--r-- | Lib/random.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/random.py b/Lib/random.py index 187b0a0..0df2664 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -881,7 +881,7 @@ def _test_generator(n, func, args): from time import perf_counter t0 = perf_counter() - data = [func(*args) for i in range(n)] + data = [func(*args) for i in _repeat(None, n)] t1 = perf_counter() xbar = mean(data) |