-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Py_tp_vectorcall in the limited API #41
Comments
We added vectorcall to multiple types successfully, it made creation of objects faster. So yes, it makes sense. |
I disagree with vector call being part of the stable ABI at all, but since that's apparently already been done, then I see no reason to oppose adding a constant that should've been there from the start. |
@erlend-aasland @mdboom @serhiy-storchaka, what's your opinion? |
@serhiy-storchaka, do you have any reservations? |
The vectorcall protocol was added to the Limited API in 3.12. It is too late to change anything here. Not exposing |
Thanks for the votes! |
tp_vectorcall
is somewhat tricky to understand, but can bring significant speedups to wrapper code.In python/cpython#100554, pybind11 and PyO3 maintainers ask to expose it for use with
PyType_FromSpec
/PyType_GetSlot
and in limited API, and Wenzel sent a PR recently.tp_vectorcall
needs to match the behavior of a metaclass call, so exposingtp_vectorcall
limits future changes toPyType_Type->tp_call
. But, I think that's already something we can't really change.Does a
Py_tp_vectorcall
slot sound reasonable?The text was updated successfully, but these errors were encountered: