mirror of
https://github.com/micropython/micropython.git
synced 2025-09-06 09:50:20 +02:00
To emphasise these benchmark tests compare the internal performance of features amongst themselves, rather than absolute performance testing.
13 lines
213 B
Python
13 lines
213 B
Python
# 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)
|