RFR: 8256318: AArch64: Add support for floating-point absolute difference
Dong Bo
dongbo at openjdk.java.net
Sat Nov 14 06:28:05 UTC 2020
This supports for floating-point absolute difference instructions, i.e. FABD scalar/vector.
Verified with linux-aarch64-server-release, tier1-3.
Added a JMH micro `test/micro/org/openjdk/bench/vm/compiler/FloatingScalarVectorAbsDiff.java` for performance test.
The FABD (scalar), the performance tests handle registers directly, the average latency reduces to almost half (~57%) of the original.
For FABD (vector), we restrict the data size (~24KB) to be less than L1 data cache size (32KB),
so that the memory access can hit in L1, and witness 14.2% (float) and 21.2% (double) improvements.
The JMH results on Kunpeng916:
Benchmark (count) (seed) Mode Cnt Score Error Units
# before, fsub+fabs
FloatingScalarVectorAbsDiff.testScalarAbsDiffDouble 1024 316731 avgt 10 6038.333 ± 3.889 ns/op
FloatingScalarVectorAbsDiff.testScalarAbsDiffFloat 1024 316731 avgt 10 6005.125 ± 3.025 ns/op
FloatingScalarVectorAbsDiff.testVectorAbsDiffDouble 1024 316731 avgt 10 950.340 ± 9.398 ns/op
FloatingScalarVectorAbsDiff.testVectorAbsDiffFloat 1024 316731 avgt 10 454.350 ± 1.798 ns/op
# after, fabd
FloatingScalarVectorAbsDiff.testScalarAbsDiffDouble 1024 316731 avgt 10 3483.801 ± 1.763 ns/op
FloatingScalarVectorAbsDiff.testScalarAbsDiffFloat 1024 316731 avgt 10 3442.412 ± 1.866 ns/op
FloatingScalarVectorAbsDiff.testVectorAbsDiffDouble 1024 316731 avgt 10 816.301 ± 4.454 ns/op
FloatingScalarVectorAbsDiff.testVectorAbsDiffFloat 1024 316731 avgt 10 354.710 ± 1.001 ns/op
-------------
Commit messages:
- 8256318: AArch64: Add support for floating-point absolute difference
Changes: https://git.openjdk.java.net/jdk/pull/1215/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1215&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8256318
Stats: 209 lines in 20 files changed: 176 ins; 0 del; 33 mod
Patch: https://git.openjdk.java.net/jdk/pull/1215.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1215/head:pull/1215
PR: https://git.openjdk.java.net/jdk/pull/1215
More information about the hotspot-dev
mailing list