Skip to content

Update to CRoaring 5.5.1 - #32

Merged
lemire merged 1 commit into
masterfrom
croaring-5.5.1
Nov 4, 2026
Merged

lemire merged 1 commit into
masterfrom
croaring-5.5.1

Conversation

@lemire

@lemire lemire commented Nov 4, 2026

Copy link
Copy Markdown
Member

Updates the amalgamated CRoaring from 5.1.0 to 5.5.1 and the expected version in TestVersion. No API changes.

Performance

Measured on a Xeon Gold 6548N (Emerald Rapids), comparing CRoaring 5.1.0 with 5.5.1. The suite is the package's benchmarks plus 47 set-operation benchmarks (61 in all), with 10 interleaved runs each, pinned to one core. The AVX2 build compiles out the AVX-512 code with CGO_CFLAGS=-DCROARING_COMPILER_SUPPORTS_AVX512=0.

AVX-512 AVX2 only
geometric mean −9.4% −9.5%
Or / Xor / AndNot, small vs. large bitmap −68% to −73% −70% to −73%
FastXor −47% −47%
Flip (sparse) −58% −55%
Or / Xor, two sparse bitmaps −9% to −14% −8% to −10%
Add many (sorted) −14% −10%
FastOr −3.9% unchanged

CRoaring 5.1.1 through 5.4.0 made FastOr up to 1.42× slower on AVX-512 hardware. That was fixed upstream in RoaringBitmap/CRoaring#952 and RoaringBitmap/CRoaring#953 (5.5.0 and 5.5.1).

A few benchmarks are 1–3% slower, such as Intersect on arrays (+2 ns) and AndNot on two sparse arrays (+1.5%). The C code on those paths is identical to 5.1.0, apart from a skew check in the array difference that makes the small-vs-large cases 3.6× faster. With functions and loops aligned to 64 bytes, all of them but one fall into noise; the remaining one is +1.5 ns on Intersect between a run and an array container. So I attribute them to code layout.

Tests

go vet and go test ./... pass on linux/amd64, with and without AVX-512, and on darwin/arm64.

On a Xeon Gold 6548N, against CRoaring 5.1.0, over the package's
benchmarks and set-operation benchmarks (61 in all, 10 interleaved runs
each, pinned to one core), the geometric mean is 9.4% faster with
AVX-512 and 9.5% faster with AVX2 only. The largest gains are on unions,
differences and symmetric differences between a small and a large
bitmap (3x to 4x), FastXor (1.9x) and Flip (2.3x). FastOr is 3.9% faster
with AVX-512 and unchanged with AVX2: CRoaring 5.1.1 through 5.5.0 had
made it up to 1.42x slower with AVX-512, which 5.5.0 and 5.5.1 fixed.
@lemire
lemire merged commit 80df58b into master Nov 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant