[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-12-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2ffaac4c8e53 by Serhiy Storchaka in branch 'default': Issue #22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX https://hg.python.org/cpython/rev/2ffaac4c8e53 -- nosy: +python-dev ___ Pyt

[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Antoine's comments. Also added few comments explaining binary data. -- Added file: http://bugs.python.org/file37470/pickle_newobj_2.patch ___ Python tracker

[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Some examples (with issue19858 for protocol 4 optimization). Unpatched: >>> len(pickle.dumps([P(12, 34) for i in range(1000)], 3)) 17258 >>> len(pickletools.optimize(pickle.dumps([P(12, 34) for i in range(1000)], 3))) 8018 >>> len(pickle.dumps([P(i, -i) for i

[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- keywords: +needs review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-11-02 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently in pickle with protocol 4 the NEWOBJ_EX opcode is used to reconstruct objects with __getnewargs__() or __getnewargs_ex__() even if there no keyword arguments. >>> import pickle, pickletools, collections >>> P = collections.namedtuple('P', 'x y')