micropython/tests/bench/func_args-3.2-kw_3.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
134 B
Python

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