lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: [jira] Updated: (LUCENE-584) Decouple Filter from BitSet
Date Wed, 06 Sep 2006 21:54:14 GMT
On 9/6/06, eks dev <eksdev@yahoo.co.uk> wrote:
> still, DenseBitsMatcher (BitSetIterator warpped in Matcher) works faster than anything
else for this case:
>
>  int skip(Matcher m) throws IOException{
>      int doc=-1, ret = 0;
>      while(m.skipTo(doc+1)){
>         doc = m.doc();
>         ret+=doc;
>       }
>      return ret;
>   }

Huh... that doesn't make much sense.
Maybe it's your pentium-M with it's shorter pipeline and less penalty
for a pipeline flush on a branch prediction miss.  You could try
substituting BitUtil.ntz2 for ntz in OpenBitSet.nextSetBit... it uses
a full binary search down to the byte level, and then an array lookup.

The nice thing about being *open* is that you can write more than one
type of iterator if you really want to:-)

-Yonik

---------------------------------------------------------------------
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