Size of dictionary
Tim Peters
tim.one at comcast.net
Thu May 29 15:56:29 EDT 2003
[Pete Goodeve]
> I'm seeing some rather surprising (to me) behaviour when I save a
> dictionary to a file with cPickle. When I remove a fraction of the
> existing entries in the dictionary, the size of the saved file can
> *increase* by something like 50%!
Show us the code you use to save the dict to a pickle, including the code
you use to open the file. Also tell us which version of Python you're
using, and which operating system.
> ...
> I realize this is due to the hashing used,
Nope, pickles don't know anything about dict hashing.
> but it still seems a bit odd.
Yup.
More information about the Python-list
mailing list