On Fri, Dec 16, 2016 at 4:06 AM, Steve D'Aprano
<steve+pyt...@pearwood.info> wrote:
> I have about a million or two keys, with a few hundred or perhaps a few
> thousand distinct values. The size of each contiguous group of keys with
> the same value can vary from 1 to perhaps a hundred or so.

Going right back to the beginning here: I think that "a million or
two" is a perfectly doable figure for a straight-forward list or dict.
You get immediately-available lookups in a straight-forward way, at
the cost of maybe 16MB of memory (if you use the same strings for the
values, the cost is just the pointers).

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to