circuitpython/tests/bench/func_builtin-2-enum_kw.py
Paul Sokolovsky 69cbec4afb tests/bench: Add testcase for positional/kwargs to enumerate().
Inspired by discussion in #577. So, in this case of builtin function,
passing args by keyword has less than 1% overhead.
2014-05-07 22:34:06 +03:00

8 lines
125 B
Python

import bench
def test(num):
for i in iter(range(num//20)):
enumerate(iterable=[1, 2], start=1)
bench.run(test)