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

Use PyObject_CallOneArg where applicable #3023

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

ankith26
Copy link
Member

A PR that follows what #3020 did

@ankith26 ankith26 requested a review from a team as a code owner July 28, 2024 17:37
@Starbuck5
Copy link
Member

This was actually part of my commit for 3020 before I pushed it up to GitHub. The reason I didn’t want to use this is because it’s not in the limited API, and I would still like to move towards compiling with the limited API.

We could have a shim that converts this to the old thing in that theoretical case, but I just felt like this was a less clear win than NoArgs, also because NoArgs docs claim speed and OneArgs docs don’t mention it.

@ankith26
Copy link
Member Author

I think this probably has the same level of "minor performance gain" as the other PR, but I didn't notice the limited API detail while making the PR

@ankith26 ankith26 force-pushed the ankith26-simple-call branch from 9e8446a to 0020f72 Compare August 21, 2024 08:29
Copy link
Member

@Starbuck5 Starbuck5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'm okay with this since it's using the fancy vectorcall underneath.

We'll get some tiny unmeasurable speedups when these functions are utilized. But you're doing this more for code modernization, I get that.

I checked and the Rect performance increases I got from the vectorcall PR are preserved here.

Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright LGTM 👍 Tests all pass locally, code replacement looks straightforward & correct to me

@MyreMylar MyreMylar merged commit 2f1bb76 into main Aug 30, 2024
26 checks passed
@ankith26 ankith26 added this to the 2.5.2 milestone Aug 30, 2024
@ankith26 ankith26 deleted the ankith26-simple-call branch August 30, 2024 11:06
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

Successfully merging this pull request may close these issues.

3 participants