-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8358179: Performance regression in Math.cbrt #25962
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
Conversation
|
👋 Welcome back missa! A progress list of the required criteria for merging this PR into |
|
@missa-prime 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 213 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. 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 (@sviswa7, @eme64) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
@missa-prime The following label 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 list. If you would like to change these labels, use the /label pull request command. |
…with andpd instruction
Webrevs
|
|
@eme64 There seems to be an environment configuration issue (unrelated to code changes) on the Windows machine(s) this PR is landing on when running pre-submit tests. Could you run the internal tests on this PR to verify everything is ok? |
|
@missa-prime I just launched some testing. Yes, it seems the windows failures are unrelated - I've seen them on other PRs too. |
|
@missa-prime All tests passed in my internal testing. |
|
I'll hold off with approval until someone else who is more knowledgeable has reviewed first. But feel free to ping me for a second review. |
… enum for UCOMISD checks
sviswa7
left a comment
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.
Looks good to me.
@eme64 Second review with the latest changes? |
|
@missa-prime The patch still looks good, though I ran testing again because of the new changes. Should complete in about 24h. |
Please add the performance for arguments in the normal range to this list. |
Sure, I added a line covering this. |
vamsi-parasa
left a comment
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 did independent testing by running the correctness tests and performance benchmarks. The change looks good to me.
Thanks,
Vamsi
eme64
left a comment
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.
Did not review the patch in detail, but looks reasonable.
Tests are passing on my end with commit 3 / v01.
@missa-prime Thanks for taking care of this!
|
/integrate |
|
@missa-prime |
|
Thanks a lot @eme64. |
|
Going to push as commit 38f59f8.
Your commit was automatically rebased without conflicts. |
|
@sviswa7 @missa-prime Pushed as commit 38f59f8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
| __ jmp(B1_4); | ||
|
|
||
| __ bind(L_2TAG_PACKET_6_0_1); | ||
| __ movsd(xmm0, ExternalAddress(NEG_INF), r11 /*rscratch*/); |
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.
note that NEG_INF is now unused
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.
Got it - thanks.
The changes described below are meant to resolve the performance regression introduced by the x86_64 cbrt double precision floating point scalar intrinsic in #24470.
The commands to run all relevant micro-benchmarks are posted below.
make test TEST="micro:CbrtPerf.CbrtPerfRanges"make test TEST="micro:CbrtPerf.CbrtPerfSpecialValues"The results of all tests posted below were captured with an Intel® Xeon 8488C using OpenJDK v26-b1 as the baseline version. The term baseline1 refers to runs with the intrinsic enabled and baseline2 refers to runs with the intrinsic disabled.
Each result is the mean of 8 individual runs, and the input ranges used match those from the original Java implementation. Overall, the changes provide a significant uplift over baseline1 except for a mild regression in the (2^(-1022) <= |x| < INF) input range, which is expected due to the extra checks. When comparing against baseline2, the modified intrinsic significantly still outperforms for the inputs (-INF < x < INF) that require heavy compute. However, the special value inputs that trigger fast path returns still perform better with baseline2.
Finally, the
jtreg:test/jdk/java/lang/Math/CubeRootTests.javatest passed with the changes.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25962/head:pull/25962$ git checkout pull/25962Update a local copy of the PR:
$ git checkout pull/25962$ git pull https://git.openjdk.org/jdk.git pull/25962/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25962View PR using the GUI difftool:
$ git pr show -t 25962Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25962.diff
Using Webrev
Link to Webrev Comment