Roaring bitmaps are a popular data structure to represents sets of integers. Given such sets, you can quickly compute unions, intersections, and so forth. It is a convenient tool when doing data processing.
And Salvatore Previti did just that for Roaring bitmaps. So you can, say, generate Roaring bitmaps in Java, then load them in Python modify them, and then load them again in Node.js before shipping them your Go program. Not that anyone is doing it, but it is possible, in theory.
â€¢ suite intersection size 262144 elements Set 33.26 ops/sec FastBitSet 14,364.56 ops/sec RoaringBitmap32 266,718.85 ops/sec âž” Fastest is RoaringBitmap32 â€¢ suite intersection (in place) 65536 elements Set 199.99 ops/sec FastBitSet 93,394.64 ops/sec RoaringBitmap32 4,720,764.58 ops/sec âž” Fastest is RoaringBitmap32 â€¢ suite intersection (new) 1048576 elements Set 3.32 ops/sec FastBitSet 1,436.14 ops/sec RoaringBitmap32 3,557.16 ops/sec âž” Fastest is RoaringBitmap32 â€¢ suite union (in place) 65536 elements Set 201.71 ops/sec FastBitSet 147,147.28 ops/sec RoaringBitmap32 497,687.77 ops/sec âž” Fastest is RoaringBitmap32 â€¢ suite union size 262144 elements Set 22.77 ops/sec FastBitSet 7,766.65 ops/sec RoaringBitmap32 274,167.71 ops/sec âž” Fastest is RoaringBitmap32 â€¢ suite union (new) 1048576 elements Set 1.72 ops/sec FastBitSet 698.26 ops/sec RoaringBitmap32 2,033.11 ops/sec âž” Fastest is RoaringBitmap32
What if you are not using Node.js. Maybe you are running your code in a browser? Salvatore Previti wrote a WebAssembly version as well, basically compiling the C code from the CRoaring library into WebAssembly. The wrapper is still incomplete and it is unclear whether WebAssembly is mature enough to give you good performance, but, one day soon, it might be possible to have fast Roaring bitmaps in the browser.