[ 
https://issues.apache.org/jira/browse/LUCENE-3179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055064#comment-13055064
 ] 

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: https://issues.apache.org/jira/browse/LUCENE-3179
>             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, TestBitUtil.java, 
> 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: http://www.atlassian.com/software/jira

        

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

Reply via email to