Michael McCandless <luc...@mikemccandless.com> wrote:
> It's curious that you see this as a hot spot.
> 
> Are you collecting a very large top N docs, relative to how many hits
> the queries match, maybe?

I did some testing on that some time ago. Microbenchmarks, so usual caveats 
apply.
https://sbdevel.wordpress.com/2015/10/05/speeding-up-core-search/

For non-tiny top-N I generally have a hard time seeing the justification of 
sentinel objects: If the hitcount is small, the allocation is wasted (your 
scenario). On the other hand, if the hitcount is high, the supposed win from 
pre-allocating the sentinels gets shadowed by overall processing. It only works 
well when hitcount is near top-N, where "near" is one of those things that are 
really hard to measure properly.

- Toke Eskildsen

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

Reply via email to