richardstartin commented on a change in pull request #7530:
URL: https://github.com/apache/pinot/pull/7530#discussion_r723456155



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/SVScanDocIdIterator.java
##########
@@ -72,16 +73,23 @@ public int advance(int targetDocId) {
 
   @Override
   public MutableRoaringBitmap applyAnd(ImmutableRoaringBitmap docIds) {
-    MutableRoaringBitmap result = new MutableRoaringBitmap();
-    IntIterator docIdIterator = docIds.getIntIterator();
-    int nextDocId;
-    while (docIdIterator.hasNext() && (nextDocId = docIdIterator.next()) < 
_numDocs) {
-      _numEntriesScanned++;
-      if (_valueMatcher.doesValueMatch(nextDocId)) {
-        result.add(nextDocId);
+    RoaringBitmapWriter<MutableRoaringBitmap> result = 
RoaringBitmapWriter.bufferWriter()
+        .expectedRange(0, _numDocs).runCompress(false).get();
+    BatchIterator docIdIterator = docIds.getBatchIterator();
+    int[] buffer = new int[256];

Review comment:
       256 was the sweet spot here and I have used this value since. Maybe it's 
worth investigating again. 
https://github.com/RoaringBitmap/RoaringBitmap/pull/243#issuecomment-381278304




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to