Antoine Pitrou added the comment:
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%.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17810>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com