FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-131798: JIT inline function pointer address for extended binary op by kumaraditya303 · Pull Request #148384 · python/cpython · GitHub

Repository navigation

gh-131798: JIT inline function pointer address for extended binary op - #148384

Draft
kumaraditya303 wants to merge 2 commits into
python:mainfrom
kumaraditya303:jit-inline-binary
Draft

kumaraditya303 wants to merge 2 commits into
python:mainfrom
kumaraditya303:jit-inline-binary

Conversation

kumaraditya303 commented Apr 11, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label May 18, 2026

ambv commented Oct 20, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

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.

ambv closed this Oct 20, 2026
ambv reopened this Oct 21, 2026
bedevere-app Bot added the type-feature A feature request or enhancement label Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stale PR or inactive for long period of time. type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL