list.pop(0) vs. collections.dequeue

Steve Howell showell30 at
Sat Jan 23 09:23:28 CET 2010

On Jan 23, 12:13 am, Terry Reedy <tjre... at> wrote:
> Challenge yes, mock no.
> Part of writing good basic data structures is not adding needless
> complication from featuritis and not penalizing 99.99% of access to
> satify a .01% need better satisfied another way.

I would like to challenge your assertion that advancing ob_item
instead of doing memmove during list_ass_slice would impact the
performance of list accesses in any way.  It would only slow down
operations that add/insert items into the list by, and then only by a
single conditional statement, and those add/insert operations are
already O(N) to begin with.

More information about the Python-list mailing list