Issue37017
Created on 2019-05-23 00:32 by msullivan, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 13516 | merged | msullivan, 2019-05-23 00:36 | |
| Messages (4) | |||
|---|---|---|---|
| msg343259 - (view) | Author: Michael J. Sullivan (msullivan) * | Date: 2019-05-23 00:32 | |
The different varieties of PyObject_CallMethod* routines all operate by doing a PyObject_GetAttr to fetch an object to call. It seems likely to be worthwhile to take advantage of the LOAD_METHOD optimization that avoids creating a bound method object when calling a method. |
|||
| msg343290 - (view) | Author: Inada Naoki (methane) * ![]() |
Date: 2019-05-23 12:16 | |
I want to wait this until PEP 590 is implemented. Unlike CALL_METHOD, we can not avoid prepending self. New method signature may be like this: PyObject_VectorCallMethod(PyObject *name, PyObject **args, Py_ssize_t nargs, PyObject *kwds); And args[0] is self. With API like this, we can avoid prepending self. |
|||
| msg343311 - (view) | Author: Michael J. Sullivan (msullivan) * | Date: 2019-05-23 16:48 | |
I believe that this is orthogonal to PEP 590. PyObject_CallMethodObjArgs and friends take varargs which need to be copied into an array one way or another. It is easy (and efficient) to prepend the base while copying the function arguments into the array (see the attached PR). I don't think that vector call will change anything about this. |
|||
| msg343535 - (view) | Author: Inada Naoki (methane) * ![]() |
Date: 2019-05-26 07:23 | |
New changeset 47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6 by Inada Naoki (Michael J. Sullivan) in branch 'master': bpo-37017: PyObject_CallMethodObjArgs uses LOAD_METHOD optimization (GH-13516) https://github.com/python/cpython/commit/47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:15 | admin | set | github: 81198 |
| 2019-05-26 07:23:47 | methane | set | messages: + msg343535 |
| 2019-05-26 07:23:47 | methane | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-05-23 16:48:57 | msullivan | set | messages: + msg343311 |
| 2019-05-23 12:16:56 | methane | set | nosy:
+ methane messages: + msg343290 |
| 2019-05-23 00:37:21 | msullivan | set | nosy:
+ brett.cannon, vstinner, serhiy.storchaka, yselivanov |
| 2019-05-23 00:36:03 | msullivan | set | keywords:
+ patch stage: patch review pull_requests: + pull_request13433 |
| 2019-05-23 00:32:24 | msullivan | create | |
