mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Reduce overhead on random timings (GH-24455)
This commit is contained in:
parent
d938816acf
commit
d9dda32040
1 changed files with 1 additions and 1 deletions
|
@ -881,7 +881,7 @@ def _test_generator(n, func, args):
|
||||||
from time import perf_counter
|
from time import perf_counter
|
||||||
|
|
||||||
t0 = 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()
|
t1 = perf_counter()
|
||||||
|
|
||||||
xbar = mean(data)
|
xbar = mean(data)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue