diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-08-24 22:58:58 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-08-24 22:58:58 (GMT) |
commit | b98b927e72b21bd821c20d2b5bc5ec6da8bb6916 (patch) | |
tree | b57a20250228cc61b7e033f39892dac4dfc78a43 /Modules | |
parent | 53cb489ed08c6940b026c1be6b7aec87eb1f02fd (diff) | |
download | cpython-b98b927e72b21bd821c20d2b5bc5ec6da8bb6916.zip cpython-b98b927e72b21bd821c20d2b5bc5ec6da8bb6916.tar.gz cpython-b98b927e72b21bd821c20d2b5bc5ec6da8bb6916.tar.bz2 |
_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).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_pickle.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index fed3fa2..f029ed6 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -346,17 +346,6 @@ _Pickle_FastCall(PyObject *func, PyObject *obj) { 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); Py_DECREF(obj); return result; |