[issue31993] pickle.dump allocates unnecessary temporary bytes / str

Olivier Grisel report at bugs.python.org
Fri Nov 10 18:37:38 EST 2017


Olivier Grisel <olivier.grisel at ensta.org> added the comment:

I have tried to implement the direct write bypass for the C version of the pickler but I get a segfault in a Py_INCREF on obj during the call to  memo_put(self, obj) after the call to _Pickler_write_large_bytes.

Here is the diff of my current version of the patch:

https://github.com/ogrisel/cpython/commit/4e093ad6993616a9f16e863b72bf2d2e37bc27b4

I am new to the Python C-API so I would appreciate some help on this one.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31993>
_______________________________________


More information about the Python-bugs-list mailing list