This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients alexandre.vassalotti, asvetlov, pitrou
Date 2013-04-21.11:27:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thank you for reviving this :)
A couple of questions:
- why ADDITEM in addition to ADDITEMS? I don't think single-element sets are an important use case (as opposed to, say, single-element tuples)
- what is the purpose of STACK_GLOBAL? I would say memoization of common names but you pass memoize=False

> For example, I think Stefan's idea, which is not specified in the
> PEP, to eliminate PUT opcodes is interesting. His proposal was to
> emit an implicit PUT opcode after each object pickled and make the
> Pickler and Unpickler classes agree on the scheme.

Are the savings worth it?
I've tried pickletools.optimize() on two objects:

- a typical data dict (http.client.responses). The pickle length decreases from 1155 to 1063 (8% shrink); unpickling is faster by 4%.

- a Logger object (logging.getLogger("foobar"). The pickle length decreases from 427 to 389 (9% shrink); unpickling is faster by 2%.
Date User Action Args
2013-04-21 11:27:37pitrousetrecipients: + pitrou, alexandre.vassalotti, asvetlov
2013-04-21 11:27:37pitrousetmessageid: <>
2013-04-21 11:27:37pitroulinkissue17810 messages
2013-04-21 11:27:37pitroucreate