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
8255299: Drop explicit zeroing at instantiation of Atomic* objects #818
Conversation
👋 Welcome back stsypanov! A progress list of the required criteria for merging this PR into |
@stsypanov The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Filed 8255299 for this. Prefix the name of the PR with "8255299: " and it should pass checks. |
Webrevs
|
|
@stsypanov This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 4 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@cl4es, @mrserb, @prrace) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
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.
The changes in src/java.desktop looks fine.
/integrate |
@stsypanov |
Changes to |
Hi Sergey, I'll give it some testing and sponsor it next week unless someone else steps up. best regards, |
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.
client changes are fine
Rebased onto master to have the fix introduced in #778 |
FYI it is better to use merge, instead of rebase+force push. Rebase breaks history and all existed code comments. |
@mrserb thanks for pointing this out! |
/integrate |
@stsypanov |
Thanks for updating with latest master changes Sergey! My tests were all green. |
@dfuch @stsypanov Since your change was applied there have been 5 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 3c4fc79. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
As discussed in #510 there is never a reason to explicitly instantiate any instance of
Atomic*
class with its default value, i.e.new AtomicInteger(0)
could be replaced withnew AtomicInteger()
which is faster:THis benchmark demonstrates that
explicitValue()
is much slower:So meanwhile https://bugs.openjdk.java.net/browse/JDK-8145948 is still in progress we could trivially replace explicit zeroing with default constructors gaining some performance benefit with no risk.
I've tested the changes locally, both tier1 and tier 2 are ok.
Could one create an issue for tracking this?
Progress
Testing
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/818/head:pull/818
$ git checkout pull/818