-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-46372: Try to mutate the LHS during fast float
ops
#30594
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
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
cf64e13
Perform specialized ops in-place when possible
brandtbucher 5e49a13
Break out common logic
brandtbucher f7187d9
Clean things up a bit
brandtbucher dd19cec
Clean up macro
brandtbucher 78cc5c4
Simplify the "small" int case
brandtbucher 218b10b
blurb add
brandtbucher 505fd8e
Catch up with main
brandtbucher 6b4cc6d
Apply first round of code revew comments
brandtbucher f21a813
Fix 32-bit Windows errrors
brandtbucher d6a69d5
Perform the inplace checks when specializing
brandtbucher f11cf6d
Remove duplicate code
brandtbucher b6f041a
Simplify things further
brandtbucher eb586b1
Remove int and refcount == 2 optimizations
brandtbucher def9c64
Catch up with main
brandtbucher 6e262ba
Revert int changes
brandtbucher 37fab55
Catch up with main
brandtbucher 04f186c
Add the "adaptive superinstructions" back
brandtbucher e0d0042
Catch up with main
brandtbucher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Core and Builtins/2022-01-13-22-50-49.bpo-46372.b00Vdn.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Improve the performance of specialized :class:`float` | ||
operations by mutating the left operand in-place when it is safe to do so. |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of giant macros and I don't like the hidden compile time control flow.
Given that the inplace and non-inplace forms specialized forms differ in a fundamental way, I'd like that to be explicit in the instructions themselves.
Maybe have two different macros, one for the inplace form and one for the non-inplace form.
You should be able to factor out some of the common code into helper macros.
That might be clearer. Up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I'll go ahead and split it up.