bruno-roustant commented on a change in pull request #1395: SOLR-14365: 
CollapsingQParser - Avoiding always allocate int[] and float[] with size equals 
to number of unique values (WIP)
URL: https://github.com/apache/lucene-solr/pull/1395#discussion_r402207235
 
 

 ##########
 File path: 
solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
 ##########
 @@ -524,6 +533,7 @@ public int docID() {
 
     public OrdScoreCollector(int maxDoc,
                              int segments,
+                             PrimitiveMapFactory mapFactory,
 
 Review comment:
   I agree that we should use primitive map instead of array if we don't load 
enough arrays. The speed of the map put/get is sufficiently fast that I suppose 
it should not be visible in the overall perf of this CollapsingQParser.
   
   But do we need to have a new factory for primitive map to switch between 
hash map and array? I think we could need this if we often had both cases (high 
load and low load of the array) AND if we had a way to switch automatically. 
But I suppose we don't know in advance (so we don't switch auto), and that most 
often the load is low.
   So I suggest that we don't add the complexity of these new classes (the new 
util.numeric package) and we just use HPPC primitive map directly.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to