jpountz commented on code in PR #15149:
URL: https://github.com/apache/lucene/pull/15149#discussion_r2333328579


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90NormsProducer.java:
##########
@@ -394,6 +394,14 @@ public long longValue() throws IOException {
             public long longValue() throws IOException {
               return slice.readByte(doc);
             }
+
+            @Override
+            public void longValues(int size, int[] docs, long[] values, long 
defaultValue)
+                throws IOException {
+              // Delegate to help performance: when the super call inlines, 
calls to
+              // #advanceExact/#longValue become monomorphic.

Review Comment:
   I'm not sure. I usually rely on nightly benchmarks, e.g. the fact that we 
got a good speedup with annotation JH at 
https://benchmarks.mikemccandless.com/OrHighHigh.html suggests that the 
`doScore` calls are properly getting inlined in BM25's `BulkSimScorer`. Also 
nightly benchmarks report whether methods are inlined, compiled or interpreted 
in the produced profiles: 
https://benchmarks.mikemccandless.com/2025.09.07.18.04.39.html#profiler_searching_1_cpu,
 for instance you can find this line `1.18%         184793        
org.apache.lucene.search.similarities.BM25Similarity$BM25Scorer#doScore() 
[Inlined code]
   ` that further confirms that `doScore` gets inlined.



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