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


##########
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:
   I understand the idea, i can try. I thought it could be challenge for 
compiler to know there is no overlap between the writing range across 
iterations.



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