list.pop(0) vs. collections.dequeue

Steve Howell showell30 at
Sun Jan 24 20:53:15 CET 2010

On Jan 24, 11:28 am, a... at (Aahz) wrote:
> In article <b4440231-f33f-49e1-9d6f-5fbce0a63... at>,
> Steve Howell  <showel... at> wrote:
> >Even with realloc()'s brokenness, you could improve pop(0) in a way
> >that does not impact list access at all, and the patch would not change
> >the time complexity of any operation; it would just add negligible
> >extract bookkeeping within list_resize() and a few other places.
> Again, your responsibility is to provide a patch and a spectrum of
> benchmarking tests to prove it.  Then you would still have to deal with
> the objection that extensions use the list internals -- that might be an
> okay sell given the effort otherwise required to port extensions to
> Python 3, but that's not the way to bet.


> Have you actually read the discussions you were pointed at?

I don't think anybody provided an actual link, but please correct me
if I overlooked it.

More information about the Python-list mailing list