uschindler commented on code in PR #12694: URL: https://github.com/apache/lucene/pull/12694#discussion_r1365474987
########## lucene/core/src/java20/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java: ########## @@ -352,6 +382,11 @@ private int dotProductBody512(byte[] a, byte[] b, int limit) { // 16-bit multiply: avoid AVX-512 heavy multiply on zmm Vector<Short> va16 = va8.convertShape(B2S, SHORT_SPECIES, 0); Vector<Short> vb16 = vb8.convertShape(B2S, SHORT_SPECIES, 0); + if (unsigned) { Review Comment: the problem is that you won't see this problem in benchmark, because each benchmark runs in a separate VM which always calls `dotProductBody512` with always same parameter. Hotspot will for sure optimize this. But if you have productive code that sometimes uses signed and sometimes unsigned multiplication, the method will be deoptimized on every change as it runs into a trap (or like that). That's not what you want. -- 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