RFR: 8272861: Add a micro benchmark for vector api
Aleksey Shipilev
shade at openjdk.java.net
Tue Aug 24 10:12:31 UTC 2021
On Mon, 23 Aug 2021 23:18:28 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
> This pull request adds a micro benchmark for Vector API.
> The Black Scholes algorithm is implemented with and without Vector API.
> We see about ~6x gain with Vector API for this micro benchmark using 256 bit vectors.
Some benchmark comments.
test/micro/org/openjdk/bench/jdk/incubator/vector/BlackScholes.java line 91:
> 89: static float A4 = -1.821255978f;
> 90: static float A5 = 1.330274429f;
> 91: static float PI = (float)Math.PI;
Want to make these `static final`?
test/micro/org/openjdk/bench/jdk/incubator/vector/BlackScholes.java line 134:
> 132:
> 133: @Benchmark
> 134: public void scalar_black_scholes(Blackhole bh) {
So there is a `Blackhole` argument here, but what is actually blackholed? AFAICS, stores to `call` and `put` are roughly okay to avoid dead-code elimination on these paths.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5234
More information about the core-libs-dev
mailing list