splitting one dictionary into two

Robert Brewer fumanchu at amor.org
Thu Apr 1 21:25:13 CEST 2004

Peter Otten wrote:
> I suggest that you rerun your timings with the above 
> modifications and a
> dictionary of size EXPECTED_LEN.
> I've got a hunch I caught you cheating :-)

D'oh! True, true. I neglected the fact that the dict got mutated (in all
cases!). Having fixed that, the order is:

for a 100-value dict: you, wes, me
for a 1000000-value dict: you, me, wes (by a factor of 5)

Sometimes I really hate timeit. :D

Robert Brewer
Amor Ministries
fumanchu at amor.org

More information about the Python-list mailing list