list.pop(0) vs. collections.dequeue

Christian Heimes lists at cheimes.de
Sat Jan 23 14:46:37 CET 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