RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v11]

Galder Zamarreño galder at openjdk.org
Tue Feb 18 10:09:18 UTC 2025


On Tue, 18 Feb 2025 09:21:46 GMT, Galder Zamarreño <galder at openjdk.org> wrote:

> For the equivalent long tests I think I made a mistake in the id of the disabled intrinsic, it should be _maxL and not _max. I will repeat the tests and post if any similar differences observed.

FYI Indeed a similar pattern is observed for long min/max (with the patch in this PR):


make test TEST="micro:org.openjdk.bench.java.lang.MinMaxVector.longReductionSimpleMax" MICRO="FORK=1"
Benchmark                            (probability)  (size)   Mode  Cnt    Score   Error   Units
MinMaxVector.longReductionSimpleMax             50    2048  thrpt    4  460.392 ± 0.076  ops/ms
MinMaxVector.longReductionSimpleMax             80    2048  thrpt    4  460.459 ± 0.438  ops/ms
MinMaxVector.longReductionSimpleMax            100    2048  thrpt    4  460.469 ± 0.057  ops/ms

make test TEST="micro:org.openjdk.bench.java.lang.MinMaxVector.longReductionSimpleMax" MICRO="FORK=1;OPTIONS=-jvmArgs -XX:CompileCommand=option,org.openjdk.bench.java.lang.jmh_generated.MinMaxVector_longReductionSimpleMax_jmhTest::longReductionSimpleMax_thrpt_jmhStub,ccstrlist,DisableIntrinsic,_maxL"
Benchmark                            (probability)  (size)   Mode  Cnt     Score   Error   Units
MinMaxVector.longReductionSimpleMax             50    2048  thrpt    4   460.453 ± 0.188  ops/ms
MinMaxVector.longReductionSimpleMax             80    2048  thrpt    4   460.507 ± 0.192  ops/ms
MinMaxVector.longReductionSimpleMax            100    2048  thrpt    4  1013.498 ± 1.607  ops/ms

make test TEST="micro:org.openjdk.bench.java.lang.MinMaxVector.longReductionMultiplyMax" MICRO="FORK=1"
Benchmark                              (probability)  (size)   Mode  Cnt    Score   Error   Units
MinMaxVector.longReductionMultiplyMax             50    2048  thrpt    4  966.429 ± 0.359  ops/ms
MinMaxVector.longReductionMultiplyMax             80    2048  thrpt    4  966.569 ± 0.338  ops/ms
MinMaxVector.longReductionMultiplyMax            100    2048  thrpt    4  966.548 ± 0.575  ops/ms

make test TEST="micro:org.openjdk.bench.java.lang.MinMaxVector.longReductionMultiplyMax" MICRO="FORK=1;OPTIONS=-jvmArgs -XX:CompileCommand=option,org.openjdk.bench.java.lang.jmh_generated.MinMaxVector_longReductionMultiplyMax_jmhTest::longReductionMultiplyMax_thrpt_jmhStub,ccstrlist,DisableIntrinsic,_maxL"
Benchmark                              (probability)  (size)   Mode  Cnt    Score   Error   Units
MinMaxVector.longReductionMultiplyMax             50    2048  thrpt    4  966.130 ± 5.549  ops/ms
MinMaxVector.longReductionMultiplyMax             80    2048  thrpt    4  966.380 ± 0.663  ops/ms
MinMaxVector.longReductionMultiplyMax            100    2048  thrpt    4  859.233 ± 7.817  ops/ms

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

PR Comment: https://git.openjdk.org/jdk/pull/20098#issuecomment-2665159015


More information about the core-libs-dev mailing list