list.pop(0) vs. collections.dequeue

Christian Heimes lists at cheimes.de
Sat Jan 23 08:46:37 EST 2010


Steve Howell wrote:
> Another benchmark is that deques are slower than lists for accessing
> elements.

deques are optimized for accessing, inserting and removing data from
both ends. For anything else it's slower than the list type. The fact
was explained in this very thread yesterday.

Christian



More information about the Python-list mailing list