kuroko/bench/list.py

11 lines
181 B
Python
Raw Permalink Normal View History

from fasttimer import timeit
2021-04-14 16:25:22 +03:00
2022-06-04 06:13:38 +03:00
if True:
l = []
2021-04-14 16:25:22 +03:00
2022-06-04 06:13:38 +03:00
def func():
l.append(1)
l.pop()
2021-04-14 16:25:22 +03:00
2022-06-04 06:13:38 +03:00
print(min(timeit(func,number=100000) for x in range(10)), "list append")