You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "rmuir (via GitHub)" <gi...@apache.org> on 2025/08/22 22:48:33 UTC

Re: [PR] Rewrite of the GroupVInt optimization without lambdas, varhandles and no code in subclasses [lucene]

rmuir commented on code in PR #15116:
URL: https://github.com/apache/lucene/pull/15116#discussion_r2294894986


##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -57,13 +59,44 @@ public static void readGroupVInts(DataInput in, int[] dst, int limit) throws IOE
    * @param offset the offset in the array to start storing ints.
    */
   public static void readGroupVInt(DataInput in, int[] dst, int offset) throws IOException {
+    readGroupVInt(true, in, dst, offset);
+  }
+
+  /** DO not use! Only visible for benchmarking purposes! */
+  public static void readGroupVInt$Baseline(DataInput in, int[] dst, int offset)
+      throws IOException {
+    readGroupVInt(false, in, dst, offset);
+  }
+
+  private static void readGroupVInt(boolean optimized, DataInput in, int[] dst, int offset)

Review Comment:
   can we still benchmark this thing properly but avoid this `optimized` boolean which is not a constant? the method is pretty low-level and i know it is just one branch but...



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org