is cPickle really this slow?
Dag
dag at animagicnet.no
Fri Oct 4 05:06:57 EDT 2002
In article <roy-FD4DA7.07325930092002 at reader1.panix.com>, Roy Smith wrote:
> Dag <dag at animagicnet.no> 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.
Wow. Yea that made all the difference. Runtime went from 35 to 3 seconds.
Dag
More information about the Python-list
mailing list