sorting 1172026 entries

Mark Lawrence breamoreboy at yahoo.co.uk
Sun May 6 15:52:56 EDT 2012


On 06/05/2012 20:11, Alec Taylor wrote:
> Also, is there a reason you are sorting the data-set after insert
> rather than using a self-sorting data-structure?
>
> A well chosen self-sorting data-structure is always more efficient
> when full data flow is controlled.
>
> I.e.: first insert can be modified to use the self-sorting data-structure
>
> I cannot think of a situation requiring permanently sorted data-sets
> which would be better served with a non-self-sorting data-structure
> except those where you do not have full data-flow control.

Possibly blist from http://pypi.python.org/pypi/blist/1.3.4 ?

-- 
Cheers.

Mark Lawrence.




More information about the Python-list mailing list