blist question

Daniel Stutzbach stutzbach at google.com
Thu Jul 7 19:03:25 CEST 2011


On Thu, Jul 7, 2011 at 5:08 AM, dmitrey <dmitrey15 at gmail.com> wrote:

> I feel lack of native Python lists operations (e.g. taking N greatest
> elements with the involved key function and O(n) speed) and
> occasionally found blist
> http://pypi.python.org/pypi/blist/
>


> Its entry says it is better than Python list. Did anyone ensure?
>

It has better performance for many operations.  I made a very detailed
performance comparison here (against Python 3.1):
    http://stutzbachenterprises.com/performance-blist

Undoubtedly, you can find sequences of operations where Python's built-in
list type has better performance by a constant factor.  Python's built-in
list type is more memory-efficient for small lists (blist's memory usage for
small lists could be improved to be similar, but I haven't gotten around to
making the necessary changes.)


> Will it ever be merged into Python source code?
>

Seems unlikely.

-- 
Daniel Stutzbach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110707/e04eab38/attachment.html>


More information about the Python-list mailing list