lpython
lpython copied to clipboard
Popping in lists is slow
The following code snippet:
q: list[i32] = []
i: i32
for i in range(100000):
q.append(i)
for i in range(100000):
q.pop(0)
takes >30s on my machine, while the C++ equivalent takes 1.3s. This is due to inefficiencies in the pop function.