[jdk8u-dev] RFR: 8302191: Performance degradation for float/double modulo on Linux

Jan Kratochvil duke at openjdk.org
Mon Apr 24 09:05:55 UTC 2023


On Tue, 4 Apr 2023 15:11:00 GMT, Jan Kratochvil <duke at openjdk.org> wrote:

> Backport of [JDK-8302191](https://bugs.openjdk.java.net/browse/JDK-8302191). It is already committed in trunk.
> The patch had to be changed as jdk11 has `sharedRuntime_x86.cpp` while jdk8 has `sharedRuntime_x86_32.cpp` and `sharedRuntime_x86_64.cpp`.
> 
> 
> build/linux-x86_64-normal-server-fastdebug/jdk/bin/java -jar ~/azul/jmh-jdk-microbenchmarks-git/micros-jdk8/target/micros-jdk8-1.0-SNAPSHOT.jar org.openjdk.bench.java.lang.FloatDoubleRem -i 2 -r 2 -wi 2 -f 2
> unpatched:
> Benchmark                            Mode  Cnt    Score    Error  Units
> FloatDoubleRem.calcDoubleJava        avgt    4  109.475 ±  4.107  ns/op
> FloatDoubleRem.calcFloatJava         avgt    4  110.561 ±  2.331  ns/op
> FloatDoubleRem.cornercaseDoubleJava  avgt    4   ≈ 10⁻⁷           ns/op
> FloatDoubleRem.cornercaseFloatJava   avgt    4   ≈ 10⁻⁷           ns/op
> patched:
> Benchmark                            Mode  Cnt   Score    Error  Units
> FloatDoubleRem.calcDoubleJava        avgt    4  39.554 ±  4.042  ns/op
> FloatDoubleRem.calcFloatJava         avgt    4  40.166 ±  8.397  ns/op
> FloatDoubleRem.cornercaseDoubleJava  avgt    4  ≈ 10⁻⁷           ns/op
> FloatDoubleRem.cornercaseFloatJava   avgt    4  ≈ 10⁻⁷           ns/op

`jdk8u-fix-no` has been added in https://bugs.openjdk.org/browse/JDK-8302191

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

PR Comment: https://git.openjdk.org/jdk8u-dev/pull/298#issuecomment-1519671134


More information about the jdk8u-dev mailing list