[Python-ideas] Multi-index Containers Library

Chris Angelico rosuav at gmail.com
Mon Dec 1 16:13:02 CET 2014


On Tue, Dec 2, 2014 at 2:03 AM, David Wilson <dw+python-ideas at hmmz.org> wrote:
>> before it would be useful to include in the stdlib, along with some
>> motivating use cases
>
> One example would be a continuous auction, like a stock exchange order
> book. In that case, efficient enumeration is desirable by all of
> account ID, order ID, or (price, time).

For small numbers of entries, it'd be simpler to just sort and filter
on demand; for large numbers of entries, you should probably be using
a database, which will have these sorts of facilities. Is there a
mid-range where it's better to keep it all in memory, but it's too
slow to sort on demand?

ChrisA


More information about the Python-ideas mailing list