Skip to content

Commit

Permalink
Don't unroll the loops
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Jul 26, 2022
1 parent 07dbf0a commit 2d594c8
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions pyperformance/data-files/benchmarks/bm_ctypes/run_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,6 @@ def benchmark(loops):
void_foo_int_int_int_int(1, 2, 3, 4)
void_foo_constchar(b"bytes")

void_foo_void()
int_foo_int(1)
void_foo_int(1)
void_foo_int_int(1, 2)
void_foo_int_int_int(1, 2, 3)
void_foo_int_int_int_int(1, 2, 3, 4)
void_foo_constchar(b"bytes")

void_foo_void()
int_foo_int(1)
void_foo_int(1)
void_foo_int_int(1, 2)
void_foo_int_int_int(1, 2, 3)
void_foo_int_int_int_int(1, 2, 3, 4)

return pyperf.perf_counter() - t0


Expand All @@ -105,6 +90,6 @@ def add_cmdline_args(cmd, args):
options = runner.parse_args()

if options.argtypes:
runner.bench_time_func("ctypes_argtypes", benchmark_argtypes, inner_loops=3)
runner.bench_time_func("ctypes_argtypes", benchmark_argtypes)
else:
runner.bench_time_func("ctypes", benchmark, inner_loops=3)
runner.bench_time_func("ctypes", benchmark)

0 comments on commit 2d594c8

Please sign in to comment.