ChrisHegarty commented on code in PR #12376: URL: https://github.com/apache/lucene/pull/12376#discussion_r1231273222
########## lucene/core/src/test/org/apache/lucene/util/TestVectorUtilProviders.java: ########## @@ -27,7 +27,7 @@ public class TestVectorUtilProviders extends LuceneTestCase { private static final double DELTA = 1e-3; private static final VectorUtilProvider LUCENE_PROVIDER = new VectorUtilDefaultProvider(); - private static final VectorUtilProvider JDK_PROVIDER = VectorUtil.PROVIDER; + private static final VectorUtilProvider JDK_PROVIDER = VectorUtilProvider.lookup(true); Review Comment: This is great - that we can ensure that we're always testing the Panama implementation. I guess the test can sometime be slow? ########## lucene/core/src/java20/org/apache/lucene/util/VectorUtilPanamaProvider.java: ########## @@ -295,7 +301,7 @@ public int dotProduct(byte[] a, byte[] b) { int res = 0; // only vectorize if we'll at least enter the loop a single time, and we have at least 128-bit // vectors (256-bit on intel to dodge performance landmines) - if (a.length >= 16 && IS_AMD64_WITHOUT_AVX2 == false) { + if (a.length >= 16 && hasFastIntegerVectors) { Review Comment: It is a bit of a pity that this check is now with a _final_ rather than _static final_, but that's the price we pay for test-ability! -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org