RFR: 8280526: x86_32 Math.sqrt performance regression with -XX:UseSSE={0,1}
Aleksey Shipilev
shade at openjdk.java.net
Mon Jan 24 16:49:24 UTC 2022
See more details in the bug.
x86_32 performance:
# ---- Before JDK-8279076
# -XX:UseAVX=0 -XX:UseSSE=0
MathBench.sqrtDouble 0 thrpt 8 406540.546 ± 2299.428 ops/ms
# -XX:UseAVX=0 -XX:UseSSE=1
MathBench.sqrtDouble 0 thrpt 8 408018.332 ± 1423.456 ops/ms
# ---- Current mainline
# -XX:UseAVX=0 -XX:UseSSE=0
MathBench.sqrtDouble 0 thrpt 8 9983.414 ± 426.007 ops/ms
# -XX:UseAVX=0 -XX:UseSSE=1
MathBench.sqrtDouble 0 thrpt 8 9883.518 ± 513.648 ops/ms
# ---- Patched
# -XX:UseAVX=0 -XX:UseSSE=0
MathBench.sqrtDouble 0 thrpt 8 407267.348 ± 1605.200 ops/ms
# -XX:UseAVX=0 -XX:UseSSE=1
MathBench.sqrtDouble 0 thrpt 8 407500.560 ± 739.249 ops/ms
While this is technically a regression in JDK 18, this is an edge case, so I would bring it to 18.0.1, instead of going into JDK 18 RDP2 process.
Additional testing:
- [x] Linux x86_64 `compiler/c2/TestSqrt.java` with `-XX:UseAVX=0 -XX:UseSSE=2`
- [x] Linux x86_32 `compiler/c2/TestSqrt.java` with `-XX:UseAVX=0 -XX:UseSSE=0`
- [x] Linux x86_32 `compiler/c2/TestSqrt.java` with `-XX:UseAVX=0 -XX:UseSSE=1`
- [x] Linux x86_32 `compiler/c2/TestSqrt.java` with `-XX:UseAVX=0 -XX:UseSSE=2`
- [x] Linux x86_32 `compiler/loopopts/superword/SumRedSqrt_Double.java` with `-XX:UseAVX=0 -XX:UseSSE=0`
- [x] Linux x86_32 `compiler/loopopts/superword/SumRedSqrt_Double.java` with `-XX:UseAVX=0 -XX:UseSSE=1`
- [x] Linux x86_32 `compiler/loopopts/superword/SumRedSqrt_Double.java` with `-XX:UseAVX=0 -XX:UseSSE=2`
- [ ] Linux x86_32 `tier1` with `-XX:UseAVX=0 -XX:UseSSE=0`
- [ ] Linux x86_32 `tier1` with `-XX:UseAVX=0 -XX:UseSSE=1`
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.java.net/jdk/pull/7200/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7200&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8280526
Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/7200.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7200/head:pull/7200
PR: https://git.openjdk.java.net/jdk/pull/7200
More information about the hotspot-compiler-dev
mailing list