[Tutor] why is list.pop(0) slow?

Alan Gauld alan.gauld@blueyonder.co.uk
Thu Jun 19 03:02:02 2003


> >I've been playing around with very large lists and found out by
chance
> >that pop(0) is 8 times slower than pop(). Is it really that bad?
> >Performance improved when the list i have is reversed and used
pop().

How big are your lists? I just tried a 1 million member list and
got no measurable difference between pop() and pop(0).

Alan G.