Processor support for select operations

Vitaly Davidovich vitalyd at
Tue Nov 11 13:47:05 UTC 2014

Have you tried doing the array access via Unsafe? It's not clear from the
citation what exactly is the issue with java array access,  but I'm
assuming it's the range checks.

Sent from my phone
On Nov 11, 2014 3:34 AM, "Paul Elschot" <paul.j.elschot at> wrote:

> Dear readers,
> I recently asked this question on the lucene-dev list
> (, and in reply David
> Weiss pointed me here.
> He also pointed to some recent discussions here on the use of bit
> operations to implement an IndexSetIterator, so you may be interested
> because of that.
> This was the question, also somewhat off topic here:
> For LUCENE-6040 it would be good to have better processor support for
> selecting the i-th set bit from a 64-bit integer.
> Not too long ago Long.bitCount() was intrinsified in JVM's.
> I hope something similar will happen to a select(long x, int i)
> method. However, better processor support is needed first.
> This is somewhat off topic here, but does anyone know how to request
> better processor support for select operations?
> Regards,
> Paul Elschot
> To be complete here are some references:
> - on the currently fastest
> select code in C,
> - the above lucene
> issue with select code in Java.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the hotspot-compiler-dev mailing list