Don't box some simple primitives (forward-port)#9261
Merged
dwijnand merged 4 commits intoscala:2.13.xfrom Feb 1, 2021
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
08da561 to
5e5c127
Compare
Member
Author
So I'll be adjusting the test expectations in addition to cherry-picking. |
Member
Author
|
Ironically overriding signum in RichDouble/Float for the purposes of deprecating them (in addition to my changing them back to math.signum) makes the methods fast but wrong, because they don't box... |
e3863f5 to
7549068
Compare
…/Float/Integer etc don't box primitives to call hashCode/toString copy with trees with side effect add tests to verify no boxing (cherry picked from commit 95f0ba0)
7549068 to
0e74a14
Compare
lrytz
reviewed
Jan 29, 2021
hamzaremmal
pushed a commit
to hamzaremmal/scala3
that referenced
this pull request
May 2, 2025
hamzaremmal
pushed a commit
to scala/scala3
that referenced
this pull request
May 7, 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
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.
don't box primitive values to call static methods on java.lang.Double/Float/Integer etc
don't box primitives to call hashCode/toString
copy with trees with side effect
add tests to verify no boxing
(cherry picked from commit 95f0ba0)
Forward-port of #9102
Refs scala/scala-dev#721