Skip to content
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

vectorcall kwnames C array #699

Open
dg-pb opened this issue Sep 28, 2024 · 0 comments
Open

vectorcall kwnames C array #699

dg-pb opened this issue Sep 28, 2024 · 0 comments

Comments

@dg-pb
Copy link

dg-pb commented Sep 28, 2024

So vectorcall protocol allows more efficient calling without needing to construct Python containers.

Still, it needs a tuple for knames.

I am modifying keyword arguments (functools.partial), where I sometimes need to modify kwnames and this results in big performance penalty when this is the case.

Not sure if this could result in more general performance improvement by not having to construct tuple in other places, but maybe this would be worthwhile considering?

E.g.

vectorcall(
    partialobject *pto,
    PyObject *const *args, size_t nargsf, 
    PyObject *const *kwnames, Py_ssize_t nkwds)

Or something similar.

Will look into this in due time, but thought maybe it is worth posting to get some thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant