You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2015/11/03 15:35:27 UTC

[jira] [Resolved] (LUCENE-6878) TopDocs.merge should use updateTop instead of pop / add

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

Adrien Grand resolved LUCENE-6878.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 5.4
                   6.0

bq. I know we are discussing how to benchmark this change but I don't think that's needed before committing

Agreed, I just committed the change.

Daniel: I am marking the issue resolved since it was committed, but feel free to comment on it about your findings about potential performance improvements.

> TopDocs.merge should use updateTop instead of pop / add
> -------------------------------------------------------
>
>                 Key: LUCENE-6878
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6878
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: Trunk
>            Reporter: Daniel Jelinski
>            Assignee: Adrien Grand
>            Priority: Trivial
>             Fix For: 6.0, 5.4
>
>         Attachments: LUCENE-6878.patch
>
>
> The function TopDocs.merge uses PriorityQueue in a pattern: pop, update value (ref.hitIndex++), add. JavaDocs for PriorityQueue.updateTop say that using this function instead should be at least twice as fast.



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

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