Instructive analyzes RoaringBitmap.andCardinality on JDK 25 and 27
An author investigates the machine code performance of Java's RoaringBitmap.andCardinality method using a lightweight sampling library called instructive. The tests reveal that on an Apple M4 with JDK 25, population counts suffer from a dependency bottleneck due to register reuse, whereas upgrading to JDK 27 introduces loop vectorization that runs seven times faster. Open article →