[New-bugs-announce] [issue39978] Vectorcall implementation should conform to PEP 590.

Mark Shannon report at bugs.python.org
Mon Mar 16 10:09:28 EDT 2020


New submission from Mark Shannon <mark at hotpy.org>:

The implementation of `PyObject_Vectorcall` adds unnecessary overhead to PEP 590, which undermines its purpose.
The implementation was changed in https://github.com/python/cpython/pull/17052, which I objected to at the time.

The change has a negative impact on performance as it add calls to both 
`PyThreadState_GET()` and `_Py_CheckFunctionResult()`.

This is practically an invitation for callers to skip `PyObject_Vectorcall` and access the underlying function pointer directly, making `PyObject_Vectorcall` pointless.

https://github.com/python/cpython/pull/17052 should be reverted.

----------
keywords: 3.9regression
messages: 364325
nosy: Mark.Shannon, petr.viktorin, vstinner
priority: normal
severity: normal
status: open
title: Vectorcall implementation should conform to PEP 590.
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39978>
_______________________________________


More information about the New-bugs-announce mailing list