diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2021-02-04 21:36:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 21:36:03 -0800 |
commit | d9dda32040f2c664321e3f9c189154e93726e397 (patch) | |
tree | c20bd6e89631ee0647b65c08bf6baf9b1fd34aa0 | |
parent | bpo-35295: Remove outdated comment. (GH-24453) (diff) | |
download | cpython-d9dda32040f2c664321e3f9c189154e93726e397.tar.gz cpython-d9dda32040f2c664321e3f9c189154e93726e397.tar.bz2 cpython-d9dda32040f2c664321e3f9c189154e93726e397.zip |
Reduce overhead on random timings (GH-24455)
-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 187b0a01694..0df26645d9e 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) |