lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3179) OpenBitSet.prevSetBit()
Date Sun, 26 Jun 2011 12:44:48 GMT


Michael McCandless commented on LUCENE-3179:

bq. One more comment: When working on the code, the symmetry all other methods have between
long and int is broken here. For consistency we should add the long method, too. I just don't
like the missing consistency.

I think we should add the long version, for consistency.

bq. Also: OpenBitSet.nextSetBit() does not use Long.numberOfTrailingZeroes() but the new prevSetBit()
does. As both methods have intrinsics, why only use one of them? Yonik?

Good question!  In testing on this issue, above, Dawid and Paul found the intrinsics were
faster on modern JREs... seems like nextSetBit should cutover too?

> OpenBitSet.prevSetBit()
> -----------------------
>                 Key: LUCENE-3179
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Paul Elschot
>            Assignee: Paul Elschot
>            Priority: Minor
>             Fix For: 3.3, 4.0
>         Attachments: LUCENE-3179-fix.patch, LUCENE-3179-fix.patch, LUCENE-3179.patch,
LUCENE-3179.patch, LUCENE-3179.patch,, TestOpenBitSet.patch
> Find a previous set bit in an OpenBitSet.
> Useful for parent testing in nested document query execution LUCENE-2454 .

This message is automatically generated by JIRA.
For more information on JIRA, see:


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

View raw message