Skip to content

gh-131798: JIT inline function addresses of builtin methods #146906

Draft
kumaraditya303 wants to merge 7 commits intopython:mainfrom
kumaraditya303:jit-inline-funcptr
Draft

gh-131798: JIT inline function addresses of builtin methods #146906
kumaraditya303 wants to merge 7 commits intopython:mainfrom
kumaraditya303:jit-inline-funcptr

Conversation

@kumaraditya303
Copy link
Copy Markdown
Contributor

@kumaraditya303 kumaraditya303 commented Mar 31, 2026

@Fidget-Spinner
Copy link
Copy Markdown
Member

Fidget-Spinner commented Mar 31, 2026

Edit: I might be wrong on the following, so please ignore the rest.

Really sorry I just realised this optimization may not be sound:

The builtin call specializations only check for that the builtin tp flags match, I don't think they check for tp_version_tag and such. So we can have a method that changes its tp_slots under our feet.

Sorry for taking up your time!

@Fidget-Spinner
Copy link
Copy Markdown
Member

Fidget-Spinner commented Mar 31, 2026

The rewriting that we discussed might still pay off though (rewriting {}.get() to a custom uop for example).

That should also be sound, provided we have the correct guards.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants