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
Add vectorcall for generic alias object #91223
Comments
Although We can advance the ga_vectorcall -> origin.vectorcall or ga_make_tp_call -> _PyObject_MakeTpCall(packed argument) -> origin.tp_call This will have no effect on tp_call, which still only needs to be packed once, while vectorcall does not need packed/unpacked |
We decided not to add it |
The point of bpo-40369 issue seems to be to provide vectorcall to the However, my idea is to add vectorcall to gaobject, like this:
The idea came from my desire to implement different subclasses of a type when implementing some kind of factory model:
In the case of high type-hint coverage, the Benchmark example:
Speedup 20% in my wsl2
|
There is a small problem with the example:
should
|
@dennis, if/when the PR looks good to you, you can merge it. |
I profiled dict[str, int](a=1, b=2), and it looks like a decent chunk of time comes from PyUnicode_New as used by PyObject_SetAttrString. You could also try replacing PyObject_SetAttrString with PyObject_SetAttr and adding "__orig_class__" to the global strings with Tools/scripts/generate_global_objects.py, probably for a later PR. |
Already done via Also, I found that |
Closing as the associated PR is merged. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: