speeding up dictionary creation

Moshe Zadka moshez at math.huji.ac.il
Fri Aug 18 01:46:14 EDT 2000


On Fri, 18 Aug 2000, Darrell Gallion wrote:

> Don't know if this is faster than cPickle or not.
> Write your data to a dictionary in a .py file which becomes compiled as a
> .pyc
> Importing the pyc is pretty fast.

It is faster, but you don't need to torture yourself -- use the marshal
module instead of cPickle to serialize your dictionaries. (that's
the mechanism .py->.pyc uses)
--
Moshe Zadka <moshez at math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez





More information about the Python-list mailing list