You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/10/06 13:10:09 UTC

[GitHub] [lucene] jpountz commented on a change in pull request #357: LUCENE-10153: Speed up BKDWriter using VarHandles.

jpountz commented on a change in pull request #357:
URL: https://github.com/apache/lucene/pull/357#discussion_r723240957



##########
File path: lucene/core/src/java/org/apache/lucene/util/ArrayUtil.java
##########
@@ -694,4 +694,81 @@ public static int compareUnsigned4(byte[] a, int aOffset, byte[] b, int bOffset)
     return Integer.compareUnsigned(
         (int) BitUtil.VH_BE_INT.get(a, aOffset), (int) BitUtil.VH_BE_INT.get(b, bOffset));
   }
+
+  /**
+   * Return a comparator that computes the common prefix length across the next {@code numBytes} of
+   * the provided arrays.
+   */
+  public static ByteArrayComparator getPrefixLengthComparator(int numBytes) {

Review comment:
       This is a good point, I moved the new helpers to a pkg-private class.




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