[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-26 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-26 Thread Inada Naoki
Inada Naoki added the comment: New changeset 47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6 by Inada Naoki (Michael J. Sullivan) in branch 'master': bpo-37017: PyObject_CallMethodObjArgs uses LOAD_METHOD optimization (GH-13516)

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-23 Thread Michael J. Sullivan
Michael J. Sullivan added the comment: 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

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-23 Thread Inada Naoki
Inada Naoki added the comment: 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.

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-22 Thread Michael J. Sullivan
Change by Michael J. Sullivan : -- nosy: +brett.cannon, serhiy.storchaka, vstinner, yselivanov ___ Python tracker ___ ___

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-22 Thread Michael J. Sullivan
Change by Michael J. Sullivan : -- keywords: +patch pull_requests: +13433 stage: -> patch review ___ Python tracker ___ ___

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-22 Thread Michael J. Sullivan
New submission from Michael J. Sullivan : 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