[vectorIntrinsics] RFR: 8263149: Adding some algorithms optimized by Vector API into JMH benc…
Ningsheng Jian
njian at openjdk.java.net
Tue Mar 9 03:55:11 UTC 2021
On Mon, 8 Mar 2021 03:31:38 GMT, Wang Zhuo <wzhuo at openjdk.org> wrote:
> Here are some code samples for panama-vector vectorIntrinsics JMH benchmarks.
> These code were developed during our work on optimizing Alibaba applications with Vector API.
> VectorDistance contains Cosine distance and Euclidean distance, scalar code from
> https://github.com/opendistro-for-elasticsearch/k-NN/blob/aa5d1d40b136e2b3d33a14e80a2a374b2be015f9/src/main/java/com/amazon/opendistroforelasticsearch/knn/plugin/script/KNNScoringUtil.java#L61
> In many scenarios, ElasticSearch engineers reported more than 4X E2E speedup using Vector API.
>
> BooleanArrayCheck and ValueRangeCheckAndCastL2I were from OLAP applications.
>
> Co-authored-by: Joshua Zhu <jzhu at openjdk.org>
Some more nits on style.
test/jdk/jdk/incubator/vector/benchmark/src/main/java/benchmark/bigdata/ValueRangeCheckAndCastL2I.java line 32:
> 30: import jdk.incubator.vector.VectorShape;
> 31: import jdk.incubator.vector.VectorSpecies;
> 32: import jdk.incubator.vector.VectorOperators;
Order the imports alphabetically?
test/jdk/jdk/incubator/vector/benchmark/src/main/java/benchmark/bigdata/VectorDistance.java line 125:
> 123: xSquareV = FloatVector.zero(SPECIES);
> 124: ySquareV = FloatVector.zero(SPECIES);;
> 125: int i= 0;
whitespace between i=
test/jdk/jdk/incubator/vector/benchmark/src/main/java/benchmark/bigdata/VectorDistance.java line 149:
> 147: xSquareV = FloatVector.zero(SPECIES);
> 148: ySquareV = FloatVector.zero(SPECIES);;
> 149: int i= 0;
whitespace between 'i='. Here and other methods with "i=". :-)
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/45
More information about the panama-dev
mailing list