kuroko/bench/list.py

11 lines
181 B
Python
Raw Normal View History

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