RFR: 8256438: AArch64: Implement match rules with ROR shift register value
Andrew Haley
aph at redhat.com
Fri Jan 29 16:29:53 UTC 2021
On 29/01/2021 10:11, Andrew Haley wrote:
> On 1/29/21 8:35 AM, Eric Liu wrote:
>> I benchmarked on 7 platforms with jmh test[1], most of them were hard to see any performance changes. On one platform the performance become bad, and seems a little unstable.
Your benchmark did not work for me. It did not generate the correct
instructions.
Please try with this or similar:
@Benchmark
public void xorRotateRight(MyState s, Blackhole blackhole) {
int x = s.xi;
int y = s.yi;
for (int i = 0; i < COUNT; i++) {
y = x ^ ((y >>> 5) | (y << -5));
x = y ^ ((x >>> 5) | (x << -5));
}
blackhole.consume(x);
}
I get:
Benchmark Mode Cnt Score Error Units
Rotation.xorRotateRight (before) avgt 3 6142.575 ± 15.940 ns/op
Rotation.xorRotateRight (after) avgt 3 4081.587 ± 33.904 ns/op
Please integrate the corrected benchmark into your patch.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-compiler-dev
mailing list