Skip to content

Commit 7ae70c6

Browse files
committed
Move range out of the loop
1 parent 8b25af9 commit 7ae70c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyperformance/data-files/benchmarks/bm_ctypes/run_benchmark.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ def benchmark(loops):
6060
void_foo_int_int_int_int = ext.void_foo_int_int_int_int
6161
void_foo_constchar = ext.void_foo_constchar
6262

63+
range_it = range(loops)
64+
6365
# Test calling the functions using the implied arguments mechanism
6466
t0 = pyperf.perf_counter()
6567

66-
for i in range(loops):
68+
for _ in range_it:
6769
void_foo_void()
6870
int_foo_int(1)
6971
void_foo_int(1)

0 commit comments

Comments
 (0)