is cPickle really this slow?

Roy Smith roy at
Mon Sep 30 07:32:59 EDT 2002

Dag <dag at> wrote:
> So I pickle my dictionary, which ends up
> being a 3.2MB file and try to run my script again, this time getting 
> the pickled dictonary instead of building it at runtime.  This time
> however the script takes over 35 seconds to run, close to three times
> as long.

Did you use the optional third argument which tells pickle to write the 
file out in binary?  My experience is that the difference in performance 
between reading binary and ascii pickles will be substantial.

More information about the Python-list mailing list