Commit b98b927e authored by Victor Stinner's avatar Victor Stinner

_pickle: remove outdated comment

_Pickle_FastCall() is now fast again!

The optimization was introduced in Python 3.2, removed in Python 3.4 and
reintroduced in Python 3.6 (thanks to the new generic fastcall functions).
parent 53cb489e
...@@ -346,17 +346,6 @@ _Pickle_FastCall(PyObject *func, PyObject *obj) ...@@ -346,17 +346,6 @@ _Pickle_FastCall(PyObject *func, PyObject *obj)
{ {
PyObject *result; PyObject *result;
/* Note: this function used to reuse the argument tuple. This used to give
a slight performance boost with older pickle implementations where many
unbuffered reads occurred (thus needing many function calls).
However, this optimization was removed because it was too complicated
to get right. It abused the C API for tuples to mutate them which led
to subtle reference counting and concurrency bugs. Furthermore, the
introduction of protocol 4 and the prefetching optimization via peek()
significantly reduced the number of function calls we do. Thus, the
benefits became marginal at best. */
result = _PyObject_CallArg1(func, obj); result = _PyObject_CallArg1(func, obj);
Py_DECREF(obj); Py_DECREF(obj);
return result; return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment