Equativ.RoaringBitmaps is a pure C# implementation of RoaringBitmap.
dotnet add package Equativ.RoaringBitmaps
Example usage:
// Create bitmaps
var a = RoaringBitmap.Create([1, 2, 3, 4, 5]);
var b = RoaringBitmap.Create([4, 5, 6, 7]);
// Compute 'and' between bitmaps
var and = a & b;
//var or = a | b;
//var xor = a ^ b;
//var not = ~a;
// Retreive
int[] result = and.ToArray(); // [4, 5]
Here are some performance benchmarks. Make sure to run the benchmarks on your own hardware and in your own context/environment to get more meaningful results.
Benchmarks include numbers on Roaring.Net, which is a C# wrapper around the "official" CRoaring written in C.
Charts are generated using chartbenchmark.net.

(lower is better)
There can be a few reasons:
C#
100.0%
Equativ.RoaringBitmaps is a pure C# implementation of RoaringBitmap.
dotnet add package Equativ.RoaringBitmaps
Example usage:
// Create bitmaps
var a = RoaringBitmap.Create([1, 2, 3, 4, 5]);
var b = RoaringBitmap.Create([4, 5, 6, 7]);
// Compute 'and' between bitmaps
var and = a & b;
//var or = a | b;
//var xor = a ^ b;
//var not = ~a;
// Retreive
int[] result = and.ToArray(); // [4, 5]
Here are some performance benchmarks. Make sure to run the benchmarks on your own hardware and in your own context/environment to get more meaningful results.
Benchmarks include numbers on Roaring.Net, which is a C# wrapper around the "official" CRoaring written in C.
Charts are generated using chartbenchmark.net.

(lower is better)
There can be a few reasons:
C#
100.0%