pickle alternative
simonwittber at gmail.com
simonwittber at gmail.com
Tue May 31 04:25:50 EDT 2005
> Ahh, I had forgotten that. Though I can't recall what an attack
> might be, I think it's because the C code hasn't been fully vetted
> for unexpected error conditions.
I tried out the marshal module anyway.
marshal can serialize small structures very qucikly, however, using the
below test value:
value = [r for r in xrange(1000000)] +
[{1:2,3:4,5:6},{"simon":"wittber"}]
marshal took 7.90 seconds to serialize it into a 5000061 length string.
decode took 0.08 seconds.
The aforementioned recipe took 2.53 seconds to serialize it into a
5000087 length string. decode took 5.16 seconds, which is much longer
than marshal!!
Sw.
More information about the Python-list
mailing list