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

GH-130415: Optimize constant comparison in JIT builds #131489

Merged
merged 11 commits into from
Mar 21, 2025

Conversation

savannahostrowski
Copy link
Member

@savannahostrowski savannahostrowski commented Mar 20, 2025

@savannahostrowski savannahostrowski changed the title GH-130415: Optimize constant comparison GH-130415: Optimize constant comparison in JIT builds Mar 20, 2025
Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Thanks, this new instruction opens a lot of doors for us in the optimizer! A few things I noticed:

@bedevere-app
Copy link

bedevere-app bot commented Mar 20, 2025

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@brandtbucher
Copy link
Member

JIT test failure looks unrelated, and due to GH-131488.

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Just a couple more things. Also, can you merge in main? I think JIT CI should be fixed.

@brandtbucher
Copy link
Member

Tail-calling failure is unrelated, and showing up on other PRs too.

@brandtbucher brandtbucher merged commit b92ee14 into python:main Mar 21, 2025
66 of 68 checks passed
@brandtbucher
Copy link
Member

So next steps would be doing the same thing for the other COMPARE_OP specializations (COMPARE_OP_FLOAT and COMPARE_OP_STR). Also for a bunch of BINARY_OP specializations like _BINARY_OP_ADD_INT, etc. (these are easier, since many of them already evaluate the constant... we just need to check to see if it's immortal).

Is this something you'd be interested in doing?

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.

None yet

2 participants