cpython: 3ab32f7add6e (original) (raw)

Mercurial > cpython

changeset 102781:3ab32f7add6e

Issue #27128: _pickle uses fast call Use _PyObject_FastCall() to avoid the creation of temporary tuple. [#27128]

Victor Stinner victor.stinner@gmail.com
date Fri, 19 Aug 2016 18:59:15 +0200
parents 71c22e592a9b
children c2af917bde71
files Modules/_pickle.c
diffstat 1 files changed, 4 insertions(+), 15 deletions(-)[+] [-] Modules/_pickle.c 19

line wrap: on

line diff

--- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -345,7 +345,6 @@ static PyObject * _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 @@ -358,13 +357,8 @@ static PyObject * significantly reduced the number of function calls we do. Thus, the benefits became marginal at best. */

@@ -1157,9 +1151,7 @@ static Py_ssize_t return -1; if (n == READ_WHOLE_LINE) {

@@ -3956,10 +3948,7 @@ save(PicklerObject *self, PyObject obj, / Check for a reduce method. */ reduce_func = PyObject_GetAttrId(obj, &PyId___reduce_); if (reduce_func != NULL) {