RFR: 8280526: x86_32 Math.sqrt performance regression with -XX:UseSSE={0,1}

Nils Eliasson neliasso at openjdk.java.net
Tue Jan 25 21:09:35 UTC 2022


On Mon, 24 Jan 2022 16:41:55 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> 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`
>  - [x] Linux x86_32 `tier1` with `-XX:UseAVX=0 -XX:UseSSE=0`
>  - [x] Linux x86_32 `tier1` with `-XX:UseAVX=0 -XX:UseSSE=1`

Looks good.

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

Marked as reviewed by neliasso (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7200


More information about the hotspot-compiler-dev mailing list