huge persistent dictionary
quinn at spew.ugcs.caltech.edu
Tue Nov 7 18:48:14 CET 2000
On Tue, 07 Nov 2000 13:05:10 -0000, gunter <gb at a3design.de> wrote:
>My Problem is, that I want to store an huge amount of data in an
>dictionary and to make it persistent.
>compiling this large file "data.py" takes about 5 Minutes and takes
>about 50 Megs of Memory.
>Is there any other way to make such structures of primitive types
>The compiling-trick-thing is a little rude, i think!
Others have made some good suggestions, but I'd recommend you try marshal
first. It only works on primitive types, but it's faster than cPickle. And
it's essentially the same as your import trick (it writes and reads python
bytecode), delta the huge intermediate file.
More information about the Python-list