benchmark(func, iterations=1000)
Signature: benchmark(func: Callable[[], Any], iterations: int = 1000) -> float
Measure average execution time of func
over iterations
runs and
return the average seconds per run.
Example
function work() returns null { ... }
print(benchmark(work, 100));