circuitpython/tests/bench/func_args-3.1-kw_1.py
Paul Sokolovsky 2a05f05f44 tests/bench: Add tests for various ways to pass function args.
Passing 3 args with keywords is for example 50% slower than via positional
args.
2014-05-07 22:34:04 +03:00

11 lines
118 B
Python

import bench
def func(a):
pass
def test(num):
for i in iter(range(num)):
func(a=i)
bench.run(test)