Skip to content

vectorcall kwnames C array #699

Open

Description

@dg-pb

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions