kaivalnp commented on PR #15736:
URL: https://github.com/apache/lucene/pull/15736#issuecomment-3936583981

   > These operations widen vectors that are already at the maximum native 
length
   
   From 
[javadocs](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.incubator.vector/jdk/incubator/vector/Vector.html#convert(jdk.incubator.vector.VectorOperators.Conversion,int))
 of `Vector#convert`:
   
   > Convert this vector to a vector of the same shape and a new element type
   
   ..I would've expected that the shape of vectors does not change?
   
   It does fix JMH benchmark performance on my AWS Graviton3 machine:
   
   Baseline
   
   ```
   Benchmark                                                       (size)   
Mode  Cnt  Score   Error   Units
   VectorUtilBenchmark.binaryHalfByteDotProductSinglePackedScalar    1024  
thrpt   15  2.453 ± 0.011  ops/us
   VectorUtilBenchmark.binaryHalfByteDotProductSinglePackedVector    1024  
thrpt   15  2.623 ± 0.012  ops/us
   VectorUtilBenchmark.binaryHalfByteSquareSinglePackedScalar        1024  
thrpt   15  2.023 ± 0.002  ops/us
   VectorUtilBenchmark.binaryHalfByteSquareSinglePackedVector        1024  
thrpt   15  2.595 ± 0.015  ops/us
   ```
   
   Candidate
   
   ```
   Benchmark                                                       (size)   
Mode  Cnt   Score   Error   Units
   VectorUtilBenchmark.binaryHalfByteDotProductSinglePackedScalar    1024  
thrpt   15   2.449 ± 0.008  ops/us
   VectorUtilBenchmark.binaryHalfByteDotProductSinglePackedVector    1024  
thrpt   15  15.205 ± 0.034  ops/us
   VectorUtilBenchmark.binaryHalfByteSquareSinglePackedScalar        1024  
thrpt   15   2.022 ± 0.002  ops/us
   VectorUtilBenchmark.binaryHalfByteSquareSinglePackedVector        1024  
thrpt   15  15.819 ± 0.102  ops/us
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to