[ 
https://issues.apache.org/jira/browse/LUCENE-7716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-7716:
---------------------------------
    Attachment: LUCENE-7716.patch

Here is a patch. Luceneutil reports no particular speedup or slowdown for the 
sorting tasks, which might mean this change makes the paging collector a bit 
faster in the case there is a single comparator, since we disabled the 
single-comparator optimization when paginating.

{noformat}
                    TaskQPS baseline      StdDev   QPS patch      StdDev        
        Pct diff
                  Fuzzy2      140.55      (9.2%)      138.08     (10.2%)   
-1.8% ( -19% -   19%)
                 Respell      261.06      (3.2%)      259.42      (3.1%)   
-0.6% (  -6% -    5%)
              AndHighMed      247.32      (1.9%)      246.06      (2.5%)   
-0.5% (  -4% -    3%)
            HighSpanNear       41.90      (2.5%)       41.69      (3.0%)   
-0.5% (  -5% -    5%)
                  Fuzzy1      120.80      (6.1%)      120.29      (5.2%)   
-0.4% ( -11% -   11%)
             LowSpanNear      190.79      (1.4%)      190.26      (1.4%)   
-0.3% (  -3% -    2%)
                  IntNRQ       19.82      (7.5%)       19.77      (7.2%)   
-0.3% ( -13% -   15%)
   HighTermDayOfYearSort       78.30      (4.7%)       78.16      (4.9%)   
-0.2% (  -9% -    9%)
                Wildcard      159.10      (3.4%)      158.92      (3.0%)   
-0.1% (  -6% -    6%)
               OrHighLow      105.11      (3.5%)      105.02      (3.6%)   
-0.1% (  -6% -    7%)
                 LowTerm      765.60      (3.4%)      765.00      (3.6%)   
-0.1% (  -6% -    7%)
                 MedTerm      299.61      (2.0%)      299.39      (2.3%)   
-0.1% (  -4% -    4%)
         MedSloppyPhrase       84.50      (3.8%)       84.48      (3.5%)   
-0.0% (  -7% -    7%)
        HighSloppyPhrase       21.42      (5.9%)       21.42      (5.7%)   
-0.0% ( -10% -   12%)
                 Prefix3       87.53      (4.4%)       87.56      (4.5%)    
0.0% (  -8% -    9%)
             MedSpanNear       54.81      (2.4%)       54.83      (2.8%)    
0.0% (  -5% -    5%)
            OrNotHighMed       87.63      (4.6%)       87.68      (4.9%)    
0.1% (  -9% -   10%)
               LowPhrase       78.09      (2.8%)       78.16      (2.7%)    
0.1% (  -5% -    5%)
              HighPhrase        4.38      (5.9%)        4.38      (5.7%)    
0.1% ( -10% -   12%)
       HighTermMonthSort      106.41      (9.3%)      106.56      (9.2%)    
0.1% ( -16% -   20%)
         LowSloppyPhrase       40.52      (2.5%)       40.58      (2.3%)    
0.2% (  -4% -    5%)
            OrHighNotMed       38.10      (9.7%)       38.16      (9.9%)    
0.2% ( -17% -   21%)
                HighTerm      105.43      (2.3%)      105.60      (2.7%)    
0.2% (  -4% -    5%)
           OrNotHighHigh       52.52      (5.2%)       52.60      (5.2%)    
0.2% (  -9% -   11%)
               OrHighMed       70.73      (5.5%)       70.88      (4.6%)    
0.2% (  -9% -   10%)
             AndHighHigh       85.67      (1.3%)       85.85      (1.3%)    
0.2% (  -2% -    2%)
              AndHighLow     1115.24      (3.3%)     1118.45      (3.1%)    
0.3% (  -5% -    6%)
           OrHighNotHigh       58.80      (5.5%)       58.97      (5.6%)    
0.3% ( -10% -   12%)
            OrNotHighLow      857.35      (4.3%)      860.72      (3.6%)    
0.4% (  -7% -    8%)
            OrHighNotLow      132.11      (9.6%)      132.70     (10.3%)    
0.5% ( -17% -   22%)
              OrHighHigh       20.51      (6.2%)       20.62      (5.6%)    
0.5% ( -10% -   13%)
               MedPhrase       80.54      (3.0%)       81.00      (2.4%)    
0.6% (  -4% -    6%)
{noformat}

> Reduce specialization in TopFieldCollector
> ------------------------------------------
>
>                 Key: LUCENE-7716
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7716
>             Project: Lucene - Core
>          Issue Type: Wish
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7716.patch
>
>
> TopFieldCollector optimizes the single-comparator case. I think we could 
> replace this specialization with a MultiLeafFieldComparator wrapper, 
> similarly to how MultiCollector works. This would have the benefit of 
> replacing code duplication of non-trivial logic with a simple wrapper that 
> delegates calls to its sub comparators.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to