Skip to content

Use PyObject_CallOneArg where applicable - #3023

Merged
MyreMylar merged 1 commit into
mainfrom
ankith26-simple-call
Aug 30, 2024
Merged

MyreMylar merged 1 commit into
mainfrom
ankith26-simple-call

Conversation

@ankith26

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@Starbuck5 Starbuck5 left a comment

Copy link
Copy Markdown
Member

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.

@MyreMylar MyreMylar left a comment

Copy link
Copy Markdown
Member

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
@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