From 267ef773c6e40c3fac0a6e5c082d929b4e215faf Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 2 Jul 2018 22:44:31 +0200 Subject: [PATCH] PEP 574: add mention of in-band performance (#687) --- pep-0574.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pep-0574.rst b/pep-0574.rst index 01a3f0dff..809158807 100644 --- a/pep-0574.rst +++ b/pep-0574.rst @@ -298,6 +298,17 @@ The distinction between readonly and writable buffers is explained below (see "Mutability"). +Side effects +============ + +Improved in-band performance +---------------------------- + +Even in-band pickling can be improved by returning a ``PickleBuffer`` +instance from ``__reduce_ex__``, as one copy is avoided on the serialization +path [#ogrisel-numpy]_. + + Caveats ======= @@ -479,6 +490,9 @@ References .. [#pickle5-pypi] ``pickle5`` project on PyPI https://pypi.org/project/pickle5/ +.. [#ogrisel-numpy] Draft use of pickle protocol 5 for Numpy array pickling + https://gist.github.com/ogrisel/a2b0e5ae4987a398caa7f9277cb3b90a + Copyright =========