New submission from Mark Shannon <m...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue39978>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to