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

gh-131798: Optimize `_UNARY_INVERT` by noamcohen97 · Pull Request #135222 · python/cpython · GitHub

Repository navigation

gh-131798: Optimize _UNARY_INVERT - #135222

Merged
Fidget-Spinner merged 11 commits into
python:mainfrom
noamcohen97:optimize-unary-invert
Jun 9, 2025
Merged

Fidget-Spinner merged 11 commits into
python:mainfrom
noamcohen97:optimize-unary-invert

Conversation

noamcohen97 commented Jun 6, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nice!

brandtbucher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good, can you add a test for the bool case?

Comment thread Python/optimizer_bytecodes.c Outdated

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing @brandtbucher and @Fidget-Spinner.
I added a test case for booleans

Copy link
Copy Markdown
Member

Hm, I didn't realize we had deprecated bitwise inversion on bool. Let's just drop bool from the optimizer, it's not worth it.

Copy link
Copy Markdown
Contributor Author

Let's just drop bool from the optimizer, it's not worth it.

Sounds good

Fidget-Spinner merged commit b150b6a into python:main Jun 9, 2025
noamcohen97 deleted the optimize-unary-invert branch June 9, 2025 10:48
lkollar pushed a commit to lkollar/cpython that referenced this pull request Jun 19, 2025
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL