RFR: 8272861: Add a micro benchmark for vector api [v3]
Paul Sandoz
psandoz at openjdk.java.net
Thu Aug 26 15:17:24 UTC 2021
On Tue, 24 Aug 2021 20:49:52 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.
>
> Sandhya Viswanathan has updated the pull request incrementally with one additional commit since the last revision:
>
> Make constants as static final
Very nice, just one minor comment (no need for another review), thanks for contributing this.
test/micro/org/openjdk/bench/jdk/incubator/vector/BlackScholes.java line 60:
> 58:
> 59: float randFloat(float low, float high) {
> 60: float val = rand.nextFloat()/Float.MAX_VALUE;
`nextFloat` returns a PSR between 0 and 1., so no need to divide by `Float.MAX_VALUE` ?
-------------
Marked as reviewed by psandoz (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5234
More information about the core-libs-dev
mailing list