list.pop(0) vs. collections.dequeue

Aahz aahz at pythoncraft.com
Sun Jan 24 14:28:53 EST 2010


In article <b4440231-f33f-49e1-9d6f-5fbce0a63bd2 at b2g2000yqi.googlegroups.com>,
Steve Howell  <showell30 at yahoo.com> 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?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

import antigravity



More information about the Python-list mailing list