[ 
https://issues.apache.org/jira/browse/LUCENE-7264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15262831#comment-15262831
 ] 

Adrien Grand commented on LUCENE-7264:
--------------------------------------

I benchmarked it using IndexAndSearchOpenStreetMaps by temporarily using 
DocIdSetBuilder instead of MatchingPoints (I did not use luceneutil since its 
numeric range queries match too many docs). The QPS went from 33.4 (old 
DocIdSetBuilder.add) to 35.0 with this patch.

In that case I think it works well since the base class is an abstract class 
and there are only two impls, [which the JVM can efficiently 
optimize|http://shipilev.net/blog/2015/black-magic-method-dispatch/#_two_types].
 (For the record, most queries of the benchmark upgrade to a bitset so both 
impls are used.)

> Fewer conditionals in DocIdSetBuilder.add
> -----------------------------------------
>
>                 Key: LUCENE-7264
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7264
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7264.patch
>
>
> As reported in LUCENE-7254, DocIdSetBuilder.add has several conditionals that 
> slow down the construction of the DocIdSet.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to