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


##########
lucene/core/src/java/org/apache/lucene/internal/vectorization/BitSetUtil.java:
##########
@@ -30,11 +34,11 @@ class BitSetUtil {
    * stored in the provided {@code array}.
    *
    * <p>NOTE: Caller need to ensure the {@code array} has a length greater 
than or equal to {@code
-   * bitSet.cardinality(from, to) + 1}.
+   * bitSet.cardinality(from, to) + 16}.
    */
-  static int denseBitsetToArray(FixedBitSet bitSet, int from, int to, int 
base, int[] array) {
-    assert bitSet.cardinality(from, to) + 1 <= array.length
-        : "Array length must be at least bitSet.cardinality(from, to) + 1";
+  public final int bitsetToArray(FixedBitSet bitSet, int from, int to, int 
base, int[] array) {
+    assert bitSet.cardinality(from, to) + 16 <= array.length
+        : "Array length must be at least bitSet.cardinality(from, to) + 16";
 
     Objects.checkFromToIndex(from, to, bitSet.length());

Review Comment:
   By the way, maybe the micro benchmark should be updated to operate on a 
`FixedBitSet` instead of a single word to better capture this sort of things.



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