Processor support for select operations

Paul Elschot paul.j.elschot at
Tue Nov 11 08:33:44 UTC 2014

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?

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.

More information about the hotspot-compiler-dev mailing list