Pixie
Loading...
Searching...
No Matches
implementations.h
Go to the documentation of this file.
1#pragma once
2
22
23// clang-format off
24/*
25 * Rank/select snapshot, 2026-10-13--16: random inputs, 2^34 bits.
26 * Ryzen 7 8845HS / WSL2, CPU 0, GCC 13.3, -O3 -DNDEBUG -march=native.
27 * Median WALL ns/query over three repetitions, 20 million queries per
28 * repetition; fixed input seeds and 8192-entry shifted query pools.
29 * Build is median wall seconds over ten repetitions, two builds per
30 * repetition. SDSL was measured separately on October 16. These measurements
31 * precede the optional-adapter CRTP migration and header relocation.
32 * Aux is logical index bytes / input bytes (%), excluding owned source copies;
33 * build includes source copies. SDSL uses rank-v + MCL for both bit values and
34 * serialized directory sizes. Missing operations are marked with a dash.
35 * FastBitVec is omitted here: its benchmark size grid stops at 2^30.
36 * Spider was not measured in this run; historical Spider results are omitted.
37 * WSL variation is substantial; small differences do not establish a winner.
38 * Full size curves, machine details and reproduction commands:
39 * src/docs/benchmarks/rank_select.md (Doxygen: Benchmarks / Rank/select).
40 *
41 * 12.5% ones
42 *
43 * | Backend | Rank1 | Rank0 | Select1 | Select0 | Build s | Aux % |
44 * | :--------- | ----: | ----: | ------: | ------: | ------: | -----: |
45 * | Baseline | 99.0 | 97.5 | 285.7 | 315.2 | 0.66 | 3.613 |
46 * | Compressed | 93.8 | 97.5 | 248.6 | 292.4 | 0.67 | 3.571 |
47 * | Pasta | 119.1 | 122.2 | 329.8 | 413.8 | 2.60 | 3.516 |
48 * | 3-star | 267.6 | 264.3 | 447.7 | - | 8.16 | 0.930 |
49 * | Orzo | 132.1 | 141.5 | 441.4 | - | 2.90 | 2.346 |
50 * | SDSL | 92.4 | 98.1 | 453.5 | 460.6 | 6.89 | 48.221 |
51 *
52 * 50% ones
53 *
54 * | Backend | Rank1 | Rank0 | Select1 | Select0 | Build s | Aux % |
55 * | :--------- | ----: | ----: | ------: | ------: | ------: | -----: |
56 * | Baseline | 95.8 | 122.1 | 317.4 | 300.8 | 0.65 | 3.613 |
57 * | Compressed | 86.2 | 98.2 | 277.6 | 275.5 | 0.50 | 3.564 |
58 * | Pasta | 139.5 | 119.3 | 248.4 | 564.2 | 2.36 | 3.516 |
59 * | 3-star | 295.0 | 257.5 | 373.1 | - | 7.64 | 0.785 |
60 * | Orzo | 139.4 | 131.2 | 385.8 | - | 2.72 | 2.493 |
61 * | SDSL | 91.2 | 103.2 | 360.3 | 439.0 | 10.79 | 48.537 |
62 *
63 * 87.5% ones
64 *
65 * | Backend | Rank1 | Rank0 | Select1 | Select0 | Build s | Aux % |
66 * | :--------- | ----: | ----: | ------: | ------: | ------: | -----: |
67 * | Baseline | 105.8 | 123.7 | 332.1 | 282.7 | 0.65 | 3.613 |
68 * | Compressed | 89.5 | 94.9 | 271.5 | 245.0 | 0.70 | 3.571 |
69 * | Pasta | 122.4 | 127.1 | 307.0 | 773.7 | 2.67 | 3.516 |
70 * | 3-star | 287.2 | 278.5 | 465.5 | - | 8.21 | 0.785 |
71 * | Orzo | 140.6 | 147.8 | 482.3 | - | 2.94 | 2.639 |
72 * | SDSL | 95.5 | 94.9 | 435.4 | 448.7 | 7.70 | 48.244 |
73 */
74// clang-format on
75
76#include <pixie/rank_select.h>
78#include <pixie/rank_select/support.h>
79
80#ifdef PIXIE_PASTA_SUPPORT
81#include <pixie/rank_select/pasta.h>
82#endif
83#ifdef SDSL_SUPPORT
84#include <pixie/rank_select/sdsl.h>
85#endif
86#ifdef PIXIE_3STAR_SUPPORT
87#include <pixie/rank_select/three_star.h>
88#endif
89#ifdef PIXIE_SUCCINCT_BITVEC_SUPPORT
90#include <pixie/rank_select/succinct_bitvec.h>
91#endif
92#ifdef PIXIE_ORZO_SUPPORT
93#include <pixie/rank_select/orzo.h>
94#endif
Compressed rank/select support with metadata-validated source prefetch.
Common interface for rank/select support over packed bit sequences.