kaivalnp commented on issue #15697:
URL: https://github.com/apache/lucene/issues/15697#issuecomment-3887367850

   Also pasting a sample JMH benchmark (from #15698) run using:
   
   ```
   java --module-path lucene/benchmark-jmh/build/benchmarks --module 
org.apache.lucene.benchmark.jmh 
"VectorUtilBenchmark.binaryHalfByte.*SinglePacked.*" -p size=1024
   ```
   
   ```
   Benchmark                                                       (size)   
Mode  Cnt  Score   Error   Units
   VectorUtilBenchmark.binaryHalfByteDotProductSinglePackedScalar    1024  
thrpt   15  2.443 ± 0.016  ops/us
   VectorUtilBenchmark.binaryHalfByteDotProductSinglePackedVector    1024  
thrpt   15  2.605 ± 0.010  ops/us
   VectorUtilBenchmark.binaryHalfByteSquareSinglePackedScalar        1024  
thrpt   15  2.020 ± 0.013  ops/us
   VectorUtilBenchmark.binaryHalfByteSquareSinglePackedVector        1024  
thrpt   15  2.587 ± 0.025  ops/us
   ```
   
   On my machine (Graviton3) -- the vectorized implementations do not give a 
large performance improvement over the scalar ones.
   
   Individual JMH iterations started strong, but performance dropped after some 
iterations. Example for `binaryHalfByteDotProductSinglePackedVector`:
   
   ```
   # Warmup Iteration   1: 11.063 ops/us
   # Warmup Iteration   2: 15.398 ops/us
   # Warmup Iteration   3: 2.589 ops/us
   # Warmup Iteration   4: 2.586 ops/us
   Iteration   1: 2.598 ops/us
   Iteration   2: 2.606 ops/us
   Iteration   3: 2.596 ops/us
   Iteration   4: 2.602 ops/us
   Iteration   5: 2.606 ops/us
   ```
   
   I'm not sure if this is just a JMH thing, or would happen in general too.


-- 
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