Solve a Debate

castironpi at gmail.com castironpi at gmail.com
Tue Feb 19 16:41:58 EST 2008


> Past a "many-small" certain point on numbers of hash-tables, if that's
> the right word, in a program, and intepreter process on a machine, is
> it be more time-efficient to allocate a 2**32-byte table?  Are
> 'modulo' and 'doublesize' the only steps of the lookup process that it
> would eliminate, and are they expensive ones?  If so, what point?  If
> not, what's a tighter bottleneck?- Hide quoted text -
>
> - Show quoted text -

There's something to it.  As stated, your idea cannot be implemented
with current assumptions that Python makes, specifically that integers
are their own hash values, possible others.  Relax this, and you may
be on to something, have a path, such as keying the object id into the
hash value.



More information about the Python-list mailing list