HomeAlgorithms & AIRoaring Bitmap: Compressed Sets for Fast Databases

🐯 Roaring Bitmap: The Compressed Bitset That Powers Search Engines

Explore how Roaring Bitmap compresses huge sets of integers by splitting them into chunks and picking the best container for each one, enabling lightning-fast unions and intersections in databases and search engines.

Algorithms & AI3DModerate60 FPS
roaring-bitmap-lab ↗ Open standalone

This simulation demonstrates how Roaring Bitmap splits a range of integers into fixed-size chunks and automatically selects the most space-efficient container, array, bitmap, or run-length-encoded, for each chunk based on its actual contents, and it visualizes how union and intersection operations are resolved container by container instead of value by value.

🔬 What It Demonstrates

This simulation demonstrates how Roaring Bitmap splits a range of integers into fixed-size chunks and automatically selects the most space-efficient container, array, bitmap, or run-length-encoded, for each chunk based on its actual contents, and it visualizes how union and intersection operations are resolved container by container instead of value by value.

🎮 How to Use

Add integers to two separate sets, either individually or as generated patterns such as sparse random values, dense clusters, or consecutive runs, and watch which container type is chosen for each chunk. Then trigger a union or intersection to see how matching chunks are combined and how non-matching chunks are copied or skipped entirely without inspecting individual values.

💡 Did You Know?

Did you know that a single Roaring Bitmap can hold some chunks stored as tiny arrays, others as full bitmaps, and others as compact runs, all at the same time, with the format chosen independently for every chunk based purely on what makes that specific chunk smallest?

⚙ Under the hood

Explore roaring bitmaps, a compressed bitmap structure that adaptively picks array, bitset, or run-length containers to store huge integer sets efficiently.

roaring-bitmapbitmapsdata-structuresdatabasessearch-enginescompressionalgorithmscomputer-science

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)