risdenk commented on code in PR #1285:
URL: https://github.com/apache/solr/pull/1285#discussion_r1066248232


##########
solr/core/src/java/org/apache/solr/search/DocSetBuilder.java:
##########
@@ -42,11 +42,7 @@ public final class DocSetBuilder {
 
   public DocSetBuilder(int maxDoc, long costEst) {
     this.maxDoc = maxDoc;
-    // For ridiculously small sets, we'll just use a sorted int[]
-    // maxDoc >>> 7 is a good value if you want to save memory, lower values
-    // such as maxDoc >>> 11 should provide faster building but at the expense
-    // of using a full bitset even for quite sparse data
-    this.threshold = (maxDoc >>> 7) + 4; // the +4 is for better testing on 
small indexes

Review Comment:
   There isn't an indication if the above is better than `(maxDoc >> 6) + 5` - 
they are both the same idea. There are fewer callers of `DocSetBuilder` than 
the `DocSetUtil#smallSetSize` so stuck w/ the `smallSetSize` formula but could 
be convinced otherwise.



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