Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Mar 17, 2024

Argument Clinic now inlines _PyArg_CheckPositional() for the limited C API. The generated code should be as fast or even a little bit faster.

@vstinner
Copy link
MemberAuthor

I made a previous attempt last August: PR gh-108500. It made _statistics._normal_dist_inv_cdf() 2x slower because of the usage of the legacy METH_VARARGS calling convention, instead of more recent and faster METH_FASTCALL.

This new attempt keeps METH_FASTCALL thanks to recent Argument Clinic changes, and so it has no impact on performance. Or maybe it's a little bit faster thanks to inlining.

cc @serhiy-storchaka@erlend-aasland

Argument Clinic now inlines _PyArg_CheckPositional() for the limited C API. The generated code should be as fast or even a little bit faster.
@vstinnervstinner merged commit 2982bdb into python:mainMar 17, 2024
@vstinnervstinner deleted the limited_statistics branch March 17, 2024 17:59
vstinner added a commit to vstinner/cpython that referenced this pull request Mar 20, 2024
…ython#116927) Argument Clinic now inlines _PyArg_CheckPositional() for the limited C API. The generated code should be as fast or even a little bit faster.
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
…ython#116927) Argument Clinic now inlines _PyArg_CheckPositional() for the limited C API. The generated code should be as fast or even a little bit faster.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…ython#116927) Argument Clinic now inlines _PyArg_CheckPositional() for the limited C API. The generated code should be as fast or even a little bit faster.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner@serhiy-storchaka