lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eks dev <eks...@yahoo.co.uk>
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
itself";
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 http://uk.mail..yahoo.com



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


Mime
View raw message