[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b241e761f8f by Victor Stinner in branch 'default': Issue #27809: map_next() uses fast call https://hg.python.org/cpython/rev/1b241e761f8f -- ___ Python tracker __

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 401f59a7020b by Victor Stinner in branch 'default': PyObject_CallMethodObjArgs() now uses fast call https://hg.python.org/cpython/rev/401f59a7020b -- ___ Python tracker

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 70f88b097f60 by Victor Stinner in branch 'default': Issue #27809: map_next() uses fast call https://hg.python.org/cpython/rev/70f88b097f60 New changeset 0e4f26083bbb by Victor Stinner in branch 'default': PyObject_CallMethodObjArgs() now uses fast c

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset c1a698edfa1b by Victor Stinner in branch 'default': Issue #27809: partial_call() uses fast call for positional args https://hg.python.org/cpython/rev/c1a698edfa1b -- ___ Python tracker

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 620b2e554be4 by Victor Stinner in branch 'default': Issue #27809: builtin___build_class__() uses fast call https://hg.python.org/cpython/rev/620b2e554be4 -- ___ Python tracker

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef0110a52e24 by Victor Stinner in branch 'default': PyEval_CallObjectWithKeywords() uses fast call with kwargs https://hg.python.org/cpython/rev/ef0110a52e24 New changeset 5587d0dfab4c by Victor Stinner in branch 'default': Issue #27809: Use _PyObje

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Stefan Behnel: "I like the oneArg/noArg etc. macros. We use something similar in Cython." Oh, nice :-) Since they macros are private, I pushed fastcall_macros.patch. We can still rework them later if needed. "You can even use them to inline the METH_O and ME

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1aefb4c4a7b4 by Victor Stinner in branch 'default': _PyFunction_FastCallDict() supports keyword args https://hg.python.org/cpython/rev/1aefb4c4a7b4 New changeset 7924eac912fe by Victor Stinner in branch 'default': Issue #27809: Cleanup _PyEval_EvalC

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 263334a652ac by Victor Stinner in branch 'default': Rename _PyObject_FastCall() to _PyObject_FastCallDict() https://hg.python.org/cpython/rev/263334a652ac -- nosy: +python-dev ___ Python tracker

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: I just took a quick look at the fastcall_kwargs-2.patch for now. It looks ok in general, but it also adds quite some special code for the dict-to-locals mapping. Is the keyword argument calling case really that important? I mean, it requires creating a dict and

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: I like the oneArg/noArg etc. macros. We use something similar in Cython. You can even use them to inline the METH_O and METH_NOARGS call cases (although I use inline functions for that in Cython). -- ___ Python track

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: fastcall_macros.patch: * Rename _PyObject_FastCall() to _PyObject_FastCallDict() * Add _PyObject_FastCall(func, args, nargs) macro * Add _PyObject_CallArg1(func, arg) macro * Add _PyObject_CallNoArg(func) macro The 3 new macros call _PyObject_FastCallDict(). S

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: > _PyObject_FastCallKeywords(PyObject **args, int nargs, PyObject **kwargs, int > nkwargs): nkwargs is the number of (key, value) pairs Hum, I don't know if it's worth to "split" the C array into two parts. Maybe it can be just: _PyObject_FastCallKeywords(PyO

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "The problem is that passing keyword arguments as a dict is not the most efficient way due to an overhead of creating a dict. For now keyword arguments are pushed on the stack as interlaced array of keyword names and values. It may be more ef

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Copy of msg273365 from the issue #27128: Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer)Date: 2016-08-22 12:29 The problem is that passing keyword arguments as a dict is not the most efficient way due to an overhead of creating a dict

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: @Stefan: Would you mind to review fastcall_kwargs-2.patch please? -- nosy: +scoder ___ Python tracker ___ __

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2: * add a fast-path to fastlocals_dict() when total_args==0 * Extract co_varnames assignement out of the loop (it's a constant) * Cleanup also the code to make it more readable -- Added file: http://bugs.python.org/file44187/fastcall_kwar

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-19 Thread STINNER Victor
New submission from STINNER Victor: _PyObject_FastCall() (added in the issue #27128) already supports keyword arguments for C functions, but not Python functions. Attached patch adds support for keyword arguments in _PyFunction_FastCall(), to allow to use _PyObject_FastCall() in more cases. E