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


##########
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'd rather use a plain `if` statement in the decoding logic
   
   I'm curious, if there's an `if` inside a low-level function like `#seek` -- 
will it slow things down by checking the condition every time, or is this 
something the JVM can compile away when `version` is declared `final`? (so 
performance-wise, it's equivalent to checking the condition only once, and 
using a separate implementation of `Populator` based on the value, like we're 
doing in this PR)



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