2019-06-26 00:27:32 -04:00
|
|
|
@micropython.viper
|
2020-03-22 22:26:08 -04:00
|
|
|
def f1c(x: int) -> int:
|
2019-06-26 00:27:32 -04:00
|
|
|
return x
|
|
|
|
|
2020-03-22 22:26:08 -04:00
|
|
|
|
2019-06-26 00:27:32 -04:00
|
|
|
@micropython.native
|
|
|
|
def call(r):
|
|
|
|
f = f1c
|
|
|
|
for _ in r:
|
|
|
|
f(1)
|
|
|
|
|
2020-03-22 22:26:08 -04:00
|
|
|
|
2019-06-26 00:27:32 -04:00
|
|
|
bm_params = {
|
|
|
|
(50, 10): (15000,),
|
|
|
|
(100, 10): (30000,),
|
|
|
|
(1000, 10): (300000,),
|
|
|
|
(5000, 10): (1500000,),
|
|
|
|
}
|
|
|
|
|
2020-03-22 22:26:08 -04:00
|
|
|
|
2019-06-26 00:27:32 -04:00
|
|
|
def bm_setup(params):
|
|
|
|
return lambda: call(range(params[0])), lambda: (params[0] // 1000, None)
|