Bit set intrinsic

Andrew Haley aph at redhat.com
Sun Oct 21 09:38:09 UTC 2018


On 10/19/2018 04:42 PM, B. Blaser wrote:
> I tried example [1] with both synchronized BitSet and dedicated
> intrinsic on x86_64 (8 cores) which revealed that the intrinsic would
> be at least 2-3x faster than the synchronized set.

Which makes it very useful for things like highly-concurrent Bloom
Filters. Here's an example of current usage:

https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/utils/BloomFilter.java

https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/io/util/Memory.java

If we can provide a really fast on/off-heap bitset in standard Java
the need for this Unsafe hackery will go away.

It's interesting that the Cassandra Bloom Filter is not thread safe; I
don't know why this is.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the jdk-dev mailing list