Integrated: 8334396: RISC-V: verify perf of ReverseBytesI/L
Hamlin Li
mli at openjdk.org
Thu Jun 20 10:14:19 UTC 2024
On Mon, 17 Jun 2024 14:38:37 GMT, Hamlin Li <mli at openjdk.org> wrote:
> Hi,
> Can you help to review the patch?
>
> The test data below shows that, if zbb is not supported on current hardware, then intrinsic brings perf regression rather than benefit.
> So, ReverseBytesI/L should only be enabled when zbb is supported.
>
> ## Test data
> existing benchmark:
> test/micro/org/openjdk/bench/java/lang/Longs.java, reverseBytes()
> test/micro/org/openjdk/bench/java/lang/Integers.java, reverseBytes()
>
> all tests running below with rvv disabled.
> tested on K230-CanMV
>
> 1. -XX:-UseZbb, intrinsic enabled by default
> o.o.b.j.lang.Integers.reverseBytes N/A 500 avgt 6128.125 ns/op
> o.o.b.j.lang.Longs.reverseBytes N/A 500 avgt 10807.930 ns/op
>
> 2. -XX:+UseZbb, intrinsic enabled by default
> o.o.b.j.lang.Integers.reverseBytes N/A 500 avgt 1788.990 ns/op
> o.o.b.j.lang.Longs.reverseBytes N/A 500 avgt 1113.734 ns/op
>
> 3. -XX:-UseZbb, and disable ReverseBytesI/L instrinsic
> o.o.b.j.lang.Integers.reverseBytes N/A 500 avgt 3552.902 ns/op
> o.o.b.j.lang.Longs.reverseBytes N/A 500 avgt 4586.980 ns/op
This pull request has now been integrated.
Changeset: 64208462
Author: Hamlin Li <mli at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/642084629a9a793a055cba8a950fdb61b7450093
Stats: 35 lines in 2 files changed: 5 ins; 30 del; 0 mod
8334396: RISC-V: verify perf of ReverseBytesI/L
Reviewed-by: fyang, rehn
-------------
PR: https://git.openjdk.org/jdk/pull/19750
More information about the hotspot-compiler-dev
mailing list