lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Elschot (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3179) OpenBitSet.prevSetBit()
Date Wed, 08 Jun 2011 19:13:58 GMT


Paul Elschot commented on LUCENE-3179:

I did a bit of performance testing (sun java 1.6.0_xx, not the very latest one).

This is a typical output on my machine (the dummy can be ignored, it is only there to make
sure that nothing is optimized away):
BitUtil nlz time: 5664 picosec/call, dummy: 11572915728
Long    nlz time: 8464 picosec/call, dummy: 7715277152

That means that the nlz code in the patch is definitely faster than Long.numberOfLeadingZeros
for the test arguments used.
The test arguments are divided roughly evenly for the possible numbers of leading zero bits.

> OpenBitSet.prevSetBit()
> -----------------------
>                 Key: LUCENE-3179
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Paul Elschot
>            Priority: Minor
>             Fix For: 3.3
>         Attachments: LUCENE-3179.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