GeezerVison is showing github.com — gh-131798: JIT inline function pointer address for extended binary op by kumaraditya303 · Pull Request #148384 · python/cpython
Conversation
kumaraditya303
commented
Apr 11, 2026
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
eendebakpt reacted with eyes emoji
|
Do you know this is worth it? In this case it's only one dependent load, and something that always resolves the same. So I'm not too sure. We try not to add new uops into the optimizer if they're not worth it as it's more maintenance burden sometimes.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I benchmarked the optimization in this PR on top of #128956
Run 1
| Benchmark |
bench_base |
bench_turbo |
| tuple_concat_unpack |
92.5 us |
92.9 us: 1.00x slower |
| str_repeat |
99.2 us |
97.8 us: 1.01x faster |
| bytes_concat |
102 us |
103 us: 1.01x slower |
| bytes_repeat |
89.0 us |
87.0 us: 1.02x faster |
| tuple_repeat |
85.2 us |
83.8 us: 1.02x faster |
| chained_list_ops |
143 us |
140 us: 1.02x faster |
| mixed_float_int |
49.6 us |
50.8 us: 1.02x slower |
| float_mix_mul |
50.9 us |
51.4 us: 1.01x slower |
| Geometric mean |
(ref) |
1.00x faster |
Not significant: list_concat_subscr, dict_merge.
Run 2
| Benchmark |
bench_base2 |
bench_turbo2 |
| list_concat_subscr |
95.5 us |
94.7 us: 1.01x faster |
| tuple_concat_unpack |
92.5 us |
93.0 us: 1.01x slower |
| str_repeat |
99.0 us |
98.1 us: 1.01x faster |
| bytes_concat |
102 us |
103 us: 1.01x slower |
| bytes_repeat |
89.3 us |
87.2 us: 1.02x faster |
| tuple_repeat |
85.3 us |
83.7 us: 1.02x faster |
| dict_merge |
181 us |
182 us: 1.01x slower |
| chained_list_ops |
142 us |
140 us: 1.02x faster |
| mixed_float_int |
49.6 us |
50.8 us: 1.02x slower |
| Geometric mean |
(ref) |
1.00x faster |
Numbers are close to (or in) the noise. Maybe 1% faster for this kind of ops.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ambv
commented
Oct 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
This PR is superseded by #157011, a newer open pull request for the same issue (gh-131798), and it no longer merges cleanly. Closing to cull the number of open pull requests. Do not reopen this pull request without getting a go-ahead from a triager or core developer.
Sorry, incorrectly marked as duplicate.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|