[jdk21u-dev] RFR: 8318158: RISC-V: implement roundD/roundF intrinsics

Olga Mikhaltsova omikhaltcova at openjdk.org
Mon Jan 15 13:19:34 UTC 2024


I would like to backport [JDK-8318158](https://bugs.openjdk.org/browse/JDK-8318158) to jdk21u in order to optimize performance in double/float rounding operations by means of intrinsics.
The patch applied cleanly.
Tested: tier1 tests passed.

The benchmark shows the following performance improvement on the T-Head RVB-ICE board:
**Before**

Benchmark                              (TESTSIZE)   Mode  Cnt   Score   Error   Units
FpRoundingBenchmark.test_round_double        2048  thrpt   15  58.679 ± 0.965  ops/ms
FpRoundingBenchmark.test_round_float         2048  thrpt   15  49.252 ± 0.887  ops/ms

**After**

Benchmark                              (TESTSIZE)   Mode  Cnt    Score   Error   Units
FpRoundingBenchmark.test_round_double        2048  thrpt   15  117.264 ± 1.254  ops/ms
FpRoundingBenchmark.test_round_float         2048  thrpt   15  119.752 ± 1.751  ops/ms

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

Commit messages:
 - Backport 19147f326c6b0e78fe72f9a7e7100047f16a0921

Changes: https://git.openjdk.org/jdk21u-dev/pull/161/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=161&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8318158
  Stats: 82 lines in 3 files changed: 82 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/161.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/161/head:pull/161

PR: https://git.openjdk.org/jdk21u-dev/pull/161


More information about the jdk-updates-dev mailing list