why is bytearray treated so inefficiently by pickle?
John Ladasky
ladasky at my-deja.com
Tue Dec 6 14:27:29 EST 2011
On a related note, pickling of arrays of float64 objects, as generated
by the numpy package for example, are wildly inefficient with memory.
A half-million float64's requires about 4 megabytes, but the pickle
file I generated from a numpy.ndarray of this size was 42 megabytes.
I know that numpy has its own pickle protocol, and that it's supposed
to help with this problem. Still, if this is a general problem with
Python and pickling numbers, it might be worth solving it in the
language itself.
More information about the Python-list
mailing list