lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Popping in lists is slow

Open advikkabra opened this issue 1 year ago • 0 comments

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.

advikkabra avatar Jun 19 '24 18:06 advikkabra