Skip to content

GH-115480: Reduce guard strength for binary ops when type of one operand is known already #118050

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

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Apr 18, 2024

Adds _GUARD_TOS_INT/FLOAT, _GUARD_NOS_INT/FLOAT and float variants and replaces _GUARD_BOTH_INT/FLOAT with them where able.

The stats show an 83% reduction in _GUARD_BOTH_INT and a 42% reduction in _GUARD_BOTH_FLOAT.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Nice win!

@markshannon
Copy link
Member Author

The four failures are a pre-existing issue with emulated ARM 64.

@markshannon markshannon merged commit a6647d1 into python:main Apr 22, 2024
48 of 52 checks passed
@markshannon markshannon deleted the more-tier2-binary-ops branch August 6, 2024 10:16
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.

3 participants