[aarch64-port-dev ] [10] RFR(S): JDK-8184943: AARCH64: Intrinsify hasNegatives

Andrew Haley aph at redhat.com
Thu Jul 20 16:21:11 UTC 2017


On 20/07/17 14:26, Dmitry Chuyko wrote:
> - What's the purpose of using custom Sink class instead of JMH's 
> Blackhole? Is that a check of mixing calculation with actual write of 
> its result? I see Blackhole usage in loopingMethod() and testMethod() 
> variants, loopingFastMethod below uses Sink.
> - What's the purpose of nested 1000 iteration loops? I guess that may 
> test impact in case of on loop unrolling. Again, I see testMethod() 
> variant without the loop.

JMH's blackhole is very slow because it contains a volatile access.
There's also a volatile access each time the @Benchmark method is
called.  These completely dominate the runtime, and grossly distort
the result.  After a lot of to-ing and fro-ing with Alekshey Shipilev,
this is what I came up with.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the aarch64-port-dev mailing list