lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: ConjunctionScorer.doNext() overstays?
Date Thu, 01 Mar 2012 18:15:52 GMT
On Thu, Mar 1, 2012 at 11:55 AM, mark harwood <markharw00d@yahoo.co.uk> wrote:

> Based on your comments re the added int comparison cost in that "hot" loop it made me
think that the abstract docIdSetIterator.docId() method call could be questioned on that basis
too?
> It looks like all DocIdSetIterator subclasses maintain a doc variable mutated elsewhere
in advance() and next() calls and docID() is meant to be idempotent so presumably a shared
variable in the base class could avoid a docID() method invocation?
> Anyhoo the profiler did not show that method up as any sort of hotspot so I don't think
it's an issue.

Maybe we could explore that?  I'm not sure about hotspot implications
though... (vs private int accessible only via getter).

Ideally, consumers of DISI should hold onto the int docID returned
from next/advance and use that... (ie, don't call docID() again,
unless it's too hard to hold onto the returned doc).

> Thanks, Mike.

Thank you!  Keep the ideas coming :)

Mike McCandless

http://blog.mikemccandless.com

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


Mime
View raw message