uschindler commented on PR #16807:
URL: https://github.com/apache/lucene/pull/16807#issuecomment-6123887919

   Hi, I can't reproduce the slowdown on an Intel machine with AVX2 (256 bits). 
I added those 2 benchamrks for VectorUtilBenchmark:
   
   ```java
     @Benchmark
     public int combinationScalar() {
       int ret = 0;
       ret += binaryDotProductScalar();
       ret += binaryDotProductUint8Scalar();
       ret += binarySquareScalar();
       ret += binarySquareUint8Scalar();
       return ret;
     }
   
     @Benchmark
     @Fork(
         value = 15,
         jvmArgsPrepend = {"--add-modules=jdk.incubator.vector"})
     public int combinationVector() {
       int ret = 0;
       ret += binaryDotProductVector();
       ret += binaryDotProductUint8Vector();
       ret += binarySquareVector();
       ret += binarySquareUint8Vector();
       return ret;
     }
   ```
   
   So it executes both paths in the same JVM behind each other. If I change the 
code to call same method, throughput is identical.
   
   But the above benchamrk should be used for testing.


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