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

Jan Kratochvil duke at openjdk.org
Tue Apr 4 15:19:56 UTC 2023


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  33.075 ± 39.328  ns/op
FloatDoubleRem.calcFloatJava         avgt    4  26.918 ±  5.213  ns/op
FloatDoubleRem.cornercaseDoubleJava  avgt    4  ≈ 10⁻⁷           ns/op
FloatDoubleRem.cornercaseFloatJava   avgt    4  ≈ 10⁻⁷           ns/op

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

Commit messages:
 - Remove whitespace change.
 - 8302191: Performance degradation for float/double modulo on Linux

Changes: https://git.openjdk.org/jdk8u-dev/pull/298/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=298&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8302191
  Stats: 298 lines in 4 files changed: 297 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk8u-dev/pull/298.diff
  Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/298/head:pull/298

PR: https://git.openjdk.org/jdk8u-dev/pull/298


More information about the jdk8u-dev mailing list