PEP 574: add mention of in-band performance (#687)

This commit is contained in:
Antoine Pitrou 2018-07-02 22:44:31 +02:00 committed by GitHub
parent 7ef0449603
commit 267ef773c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -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
=========