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


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99HnswVectorsReader.java:
##########
@@ -76,6 +79,7 @@ public final class Lucene99HnswVectorsReader extends 
KnnVectorsReader
   private final FieldInfos fieldInfos;
   private final IntObjectHashMap<FieldEntry> fields;
   private final IndexInput vectorIndex;
+  private final Populator dataReader;

Review Comment:
   I don't believe that the JVM can compile it away. However, this if statement 
should be easily predictable, and right after it we decode 16 doc ID deltas and 
then compute their prefix sum. I'd expect the latter to be the bottleneck and 
the extra cost of the if statement to be negligible.
   
   If we find benchmarks that say otherwise, we can still fork this file format 
into a new one that only ever reads doc ID deltas using group-varint to fix the 
problem.
   
   FWIW with two implementations of `Populator`, the JVM would compile it 
similarly as an `if` statement.



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

Reply via email to