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