Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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!

Python/optimizer_bytecodes.c Outdated Show resolved Hide resolved
markshannon and others added 2 commits April 19, 2024 09:25
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
@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
@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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.