[Python-Dev] Counting collisions for the win (original) (raw)

Frank Sievertsen frank at sievertsen.de
Mon Jan 23 21:43:11 CET 2012


Interesting idea, and I see it would avoid conversions. What happens if the data area also removed from the hash? So you enter 20 colliding keys, then 20 more that get randomized, then delete the 18 of the first 20. Can you still find the second 20 keys? Takes two sets of probes, somehow? That's no problem, because the dict doesn't really free a slot, it replaces the values with a dummy-values.

These places are later reused for new values or the whole dict is recreated and resized.

Frank



More information about the Python-Dev mailing list