a list-like type with better asymptotic performance and similar performance on small lists
The blist is a drop-in replacement for the Python list the provides better performance when modifying large lists. The blist package also Provides sortedlist, sortedset, weaksortedlist,weaksortedset, sorteddict, and btuple types.
Full documentation is at the link below:
Python's built-in list is a dynamically-sized array; to insert or removal an item from the beginning or middle of the list, it has to move most of the list in memory, i.e., O(n) operations. The blist uses a flexible, hybrid array/tree structure and only needs to move a small portion of items in memory, specifically using O(log n) operations.
For small lists, the blist and the built-in list have virtually identical performance