changeset: 102757:89e4ad001f3d user: Victor Stinner date: Fri Aug 19 16:42:42 2016 +0200 files: Python/ceval.c description: PyEval_CallObjectWithKeywords() uses fast call Issue #27128: Modify PyEval_CallObjectWithKeywords() to use _PyObject_FastCall() when args==NULL and kw==NULL. It avoids the creation of a temporary empty tuple for positional arguments. diff -r a1a29d20f52d -r 89e4ad001f3d Python/ceval.c --- a/Python/ceval.c Fri Aug 19 16:11:43 2016 +0200 +++ b/Python/ceval.c Fri Aug 19 16:42:42 2016 +0200 @@ -4592,6 +4592,10 @@ #endif if (arg == NULL) { + if (kw == NULL) { + return _PyObject_FastCall(func, NULL, 0, 0); + } + arg = PyTuple_New(0); if (arg == NULL) return NULL;