lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eks dev <>
Subject Another DisjunctionSumScorer micro-tweak / simplification?
Date Wed, 23 Jan 2008 13:50:49 GMT
method next() is the only place where DisjunctionSumScorer uses scorerDocQueue.size() method,
on other places cached variable is used:
 private int queueSize = -1; // used to avoid size() method calls on scorerDocQueue 

I have tested if these are really mirrored with:
assert(queueSize == scorerDocQueue.size()) : "cached queueSize not in sync with the queue
and they are indeed equivalent.

this value gets practically maintained on two places, any reason for that?  I would suggest
to use scorerDocQueue.size()  uniformly as this method gets definitely inlined.  


Sent from Yahoo! Mail - a smarter inbox

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message