[
https://issues.apache.org/jira/browse/LUCENE-6878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14987149#comment-14987149
]
Toke Eskildsen commented on LUCENE-6878:
----------------------------------------
In light of my own recent experiments with PriorityQueue (SOLR-6828), I'll note
that microbenchmarks are exceedingly simple to screw up, especially in Java. I
ended up doing comparative testing with pre-generated test inputs, multiple
runs, discarding the first runs, alternating between the implementation
multiple times and removing outliers. And the results are still not very stable.
> 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
> 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: [email protected]
For additional commands, e-mail: [email protected]