> The goal of this PR is to implement an x86_64 intrinsic for 
> java.lang.Math.cbrt() using libm. There is a new set of micro-benchmarks are 
> included to check the performance of specific input value ranges to help 
> prevent regressions in the future.
> 
> The command to run all range specific micro-benchmarks is posted below.
> 
> `make test TEST="micro:CbrtPerf.CbrtPerfRanges"`
> 
> The results of all tests posted below were captured with an [IntelĀ® Xeon 
> 6761P](https://www.intel.com/content/www/us/en/products/sku/241842/intel-xeon-6761p-processor-336m-cache-2-50-ghz/specifications.html)
>  using [OpenJDK 
> v25-b21](https://github.com/openjdk/jdk/releases/tag/jdk-25%2B21) as the 
> baseline version.
> 
> For performance data collected with the new built in range micro-benchmark, 
> see the table below. Each result is the mean of 8 individual runs, and the 
> input ranges used match those from the original Java implementation. Overall, 
> the intrinsic provides a major uplift of 169% when very small inputs are used 
> and a more modest uplift of 45% for all other inputs.
> 
> | Input range(s)                                  | Baseline throughput 
> (ops/ms) | Intrinsic throughput (ops/ms) | Speedup |
> | :-------------------------------------: | :-------------------------------: 
> | :-------------------------------: | :---------: |
> | [-2^(-1022), 2^(-1022)]                   | 6568                            
>             | 17678                                      | 2.69x       |
> | (-INF, -2^(-1022)], [2^(-1022), INF) | 138932                               
>      | 200897                                    | 1.45x       |
> 
> Finally, the `jtreg:test/jdk/java/lang/Math/CubeRootTests.java` test passed 
> with the changes.

Mohamed Issa has updated the pull request incrementally with two additional 
commits since the last revision:

 - Add newline back to templateInterpreterGenerator_x86_64.cpp source file
 - Add special case values to cbrt micro-benchmark set

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/24470/files
  - new: https://git.openjdk.org/jdk/pull/24470/files/ff4d4f22..233e0188

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24470&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24470&range=03-04

  Stats: 40 lines in 2 files changed: 39 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/24470.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24470/head:pull/24470

PR: https://git.openjdk.org/jdk/pull/24470

Reply via email to