list.pop(0) vs. collections.dequeue

Daniel Stutzbach daniel at stutzbachenterprises.com
Sat Jan 23 01:05:36 CET 2010


On Fri, Jan 22, 2010 at 5:27 PM, Steve Howell <showell30 at yahoo.com> wrote:

> I actually do expect Python to solve performance problems for me that
> are more easily solved in core than in Python itself.  So I guess
> that's where we differ.
>

You might be interested in the extension type I wrote (the "blist") that
looks, acts, and quacks like a list, but takes worst-case O(log n) time for
inserting and removing elements anywhere in the list.

It's available for download here:

http://pypi.python.org/pypi/blist/

And there's a detailed performance comparison with the built-in list here:

http://stutzbachenterprises.com/performance-blist

--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100122/596c3def/attachment.html>


More information about the Python-list mailing list