RFR: 8334397: RISC-V: verify perf of ReverseBytesS/US

Ludovic Henry luhenry at openjdk.org
Tue Jun 25 12:54:15 UTC 2024


On Tue, 25 Jun 2024 08:12:53 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> test/micro/org/openjdk/bench/java/lang/Characters.java line 69:
>> 
>>> 67: 
>>> 68:     @Benchmark
>>> 69:     public void reverseBytes() {
>> 
>> I'm not sure we want to be adding that benchmark to this class. Could you move to a different class that will test exclusively `reverseBytes` on `char[]`? You can then move the code from `test/micro/org/openjdk/bench/java/lang/Shorts.java` into that same class or a similarly named class for `short[]`.
>
> Not sure if I understand you correctly.
> The test is for reverseBytes of a char, not char[]. And it's quite similar as existing test in for integer at: https://github.com/openjdk/jdk/blob/master/test/micro/org/openjdk/bench/java/lang/Integers.java#L171

I meant put this `reverseBytes` benchmark in a different class, but given it's how it's done in https://github.com/openjdk/jdk/blob/master/test/micro/org/openjdk/bench/java/lang/Integers.java#L171, please ignore this comment.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19830#discussion_r1652763769


More information about the hotspot-compiler-dev mailing list