[issue9120] Reduce pickle size for an empty set

Raymond Hettinger report at bugs.python.org
Wed Jun 30 18:48:16 CEST 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

> A further version of the pickle protocol could 
> have a dedicated opcode for sets instead...

-1 We don't have to introduce a new (and backwards incompatible) opcode for every possible container type.  The space savings is miniscule (because you still need to list out the items).  All that is saved is the enclosing list or tuple setup (five bytes in the case of sets). 

People concerned about pickle size would be much better off investing time into a more generic solution (such as adding a code to automatically run zip/gzip/bzip/xz etc).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9120>
_______________________________________


More information about the Python-bugs-list mailing list