speeding up dictionary creation
Moshe Zadka
moshez at math.huji.ac.il
Fri Aug 18 01:47:54 EDT 2000
On Fri, 18 Aug 2000, idfx wrote:
> I had a problem a while ago kinda like this. My solution was also
> cPickle. I also tweaked some extra speed sometimes by using the
> dictionary.keys() function, which returns a list, which you can play
> with a lot faster. This also makes incremental updates easier, cuz you
> can just search the keyslist for existing data and only have to
> actually read and parse and process the part that you have to change...
> I got maybe a full 1/3 better speed sometimes, than using the straight
> cPickled dictionary, but I dunno if this is at all applicable to your
> situation, because my working environment was odd.
Hmmmmm....sounded like one of the db module would suite you better.
Did you try something like "gdbm", "dbm" or "bsddb"?
--
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