optimizing large dictionaries
ptmcg at austin.rr.com
Fri Jan 16 04:01:43 CET 2009
On Jan 15, 5:31 pm, Per Freem <perfr... at yahoo.com> wrote:
> ...the aKeys are very small (less than 100) where
> as the bKeys are the ones that are in the millions. so in that case,
> doing a Try-Except on aKey should be very efficient, since often it
> will not fail, ...
Do you know the aKeys in advance? If so, then just initialize the
first layer, and it will never fail.
More information about the Python-list