<div class="gmail_quote">On Thu, Jul 7, 2011 at 5:08 AM, dmitrey <span dir="ltr"><<a href="mailto:dmitrey15@gmail.com">dmitrey15@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I feel lack of native Python lists operations (e.g. taking N greatest<br>
elements with the involved key function and O(n) speed) and<br>
occasionally found blist<br>
<a href="http://pypi.python.org/pypi/blist/" target="_blank">http://pypi.python.org/pypi/blist/</a><br>
</blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Its entry says it is better than Python list. Did anyone ensure?<br></blockquote><div><br></div>
<div>It has better performance for many operations.  I made a very detailed performance comparison here (against Python 3.1):</div><div>    <a href="http://stutzbachenterprises.com/performance-blist">http://stutzbachenterprises.com/performance-blist</a></div>
<div><br></div><div>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.)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Will it ever be merged into Python source code?<br></blockquote><div><br></div><div>Seems unlikely. </div></div><br>-- <br>Daniel Stutzbach<br>