English

Rank and select: Another lesson learned

Data Structures and Algorithms 2016-05-13 v2

Abstract

Rank and select queries on bitmaps are essential building bricks of many compressed data structures, including text indexes, membership and range supporting spatial data structures, compressed graphs, and more. Theoretically considered yet in 1980s, these primitives have also been a subject of vivid research concerning their practical incarnations in the last decade. We present a few novel rank/select variants, focusing mostly on speed, obtaining competitive space-time results in the compressed setting. Our findings can be summarized as follows: (i)(i) no single rank/select solution works best on any kind of data (ours are optimized for concatenated bit arrays obtained from wavelet trees for real text datasets), (ii)(ii) it pays to efficiently handle blocks consisting of all 0 or all 1 bits, (iii)(iii) compressed select does not have to be significantly slower than compressed rank at a comparable memory use.

Keywords

Cite

@article{arxiv.1605.01539,
  title  = {Rank and select: Another lesson learned},
  author = {Szymon Grabowski and Marcin Raniszewski},
  journal= {arXiv preprint arXiv:1605.01539},
  year   = {2016}
}

Comments

Compared to v1: slightly optimized rank implementations

R2 v1 2026-06-22T13:53:47.561Z