Is 100,000 entries big for a dictionary?
rturpin at my-deja.com
rturpin at my-deja.com
Sun Dec 31 20:39:36 EST 2000
In article <mailman.978306855.25759.python-list at python.org>,
"Tim Peters" <tim.one at home.com> wrote:
> On most machines hash values are 32 bits, and are always
> computed as such, and are cached in the dict entry.
> When it's time to grow, the table does double in size,
> but hash values are not recomputed -- it simply uses one
> more of the hash bits that's always been there. Note
> that entries are reinserted when the table grows --
> that's probably not what you meant by "the usual
> extensible hashing mechanism". ..
Actually, that describes exactly what I meant. This is
now a pretty standard algorithm used in a variety of
DBMS and other applications. Only the entries whose
next bit is 1 need to be reinserted, though that can
cause other entries to move in the lower half if there
were previous collisions.
Having-implemented-this-a-time-or-two'ly yrs,
Russell
Sent via Deja.com
http://www.deja.com/
More information about the Python-list
mailing list