Skip to content

Commit

Permalink
Move range out of the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Jun 13, 2022
1 parent 02a2ba1 commit 55c1309
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ def benchmark(loops):
void_foo_int_int_int_int = ext.void_foo_int_int_int_int
void_foo_constchar = ext.void_foo_constchar

range_it = range(loops)

# Test calling the functions using the implied arguments mechanism
t0 = pyperf.perf_counter()

for i in range(loops):
for _ in range_it:
void_foo_void()
int_foo_int(1)
void_foo_int(1)
Expand Down

0 comments on commit 55c1309

Please sign in to comment.