From d9dda32040f2c664321e3f9c189154e93726e397 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Thu, 4 Feb 2021 21:36:03 -0800 Subject: Reduce overhead on random timings (GH-24455) --- Lib/random.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v0.12