[Python-Dev] Re: [Python-checkins] python/nondist/sandbox/datetime picklesize.py,NONE,1.1

Michael Hudson mwh@python.net
03 Dec 2002 18:02:12 +0000


tim_one@users.sourceforge.net writes:

> New program just to display pickle sizes.  This makes clear that the
> copy_reg based C implementation is much more space-efficient in the
> end than the __getstate__/__setstate__ based Python implementation,
> but that 4-byte date objects still suffer > 10 bytes of overhead each
> no matter how many of them you pickle in one gulp.

Presumably there's a possibility of an optimization for pickling
homogeneous (i.e. all the same type) lists (in pickle.py, not here).

Hard to say whether it would be worth it, though.

Cheers,
M.

-- 
  This is the fixed point problem again; since all some implementors
  do is implement the compiler and libraries for compiler writing, the
  language becomes good at writing compilers and not much else!
                                 -- Brian Rogoff, comp.lang.functional