micropython/tests/internal_bench/funcall-2-funcall.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
216 B
Python
Raw Normal View History

# Function call overhead test
# Perform the same trivial operation as global function call
import bench
def f(x):
return x + 1
def test(num):
for i in iter(range(num)):
a = f(i)
bench.run(test)