arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.25528cs.DS
收藏

工程化实用的简洁位向量:Apple Silicon ARM64 核心上的时空帕累托分析

Engineering Practical Succinct Bit Vectors: A Space-Time Pareto Analysis on Apple Silicon ARM64 Cores

Ishant Garg

AI总结:

本文在 Apple Silicon ARM64 架构上工程化实现了三种简洁位向量(BlockBitVec、FastBitVec、RRRBitVec),通过非对称块边界和超块采样索引分别将 rank 查询加速 1.4 倍、select 查询加速 4.9 倍,并揭示了 RRRBitVec 的密度相关对称钟形曲线延迟特性。

摘要:

简洁数据结构使用的空间接近信息论下限,同时直接在压缩表示上回答查询。在本文中,我们提出了对位向量上 rank 和 select 查询的实用工程研究。我们评估了经典的两级块基线(BlockBitVec)、一种非对称超块实现(FastBitVec)以及基于 Raman、Raman 和 Rao(RRR)编码方案的熵压缩表示(RRRBitVec)。在 Apple Silicon(M 系列 ARM 架构)上,我们通过非对称的 4096/256 位块边界展示了 rank 查询的 1.4 倍加速,rank 索引开销为 7.8%。我们研究了 RRRBitVec 的经验行为,并观察到 rank 延迟的对称密度相关钟形曲线——其中极端密度(1% 和 99%)下的查询由于边界类别的偏移消除而运行速度最多快 39%。我们进一步表明,RRRBitVec 通过使用超块级采样索引(将顺序扫描限制为 L1 缓存查找),在均匀密度下以 33.7 ns 运行,相比经典的二分查找 select 基线实现了 4.9 倍的加速。所有实现均通过正确性模糊测试验证,执行超过 7800 万次断言且无失败。源代码和测试工具已公开提供。

英文摘要:

Succinct data structures use space close to the information-theoretic minimum while answering queries directly on the compressed representation. In this paper, we present a practical engineering study of rank and select queries on bit vectors. We evaluate a classic two-level block baseline (BlockBitVec), an asymmetric superblock implementation (FastBitVec), and an entropy-compressed representation (RRRBitVec) based on the Raman, Raman, and Rao (RRR) coding scheme. On Apple Silicon (M-series ARM architecture), we demonstrate a 1.4x speedup in rank queries through asymmetric 4096/256-bit block boundaries, with a rank index overhead of 7.8%. We investigate the empirical behavior of RRRBitVec and observe a symmetric density-dependent bell-curve for rank latency -- where queries at extreme densities (1% and 99%) run up to 39% faster due to offset elimination at boundary classes. We further show that RRRBitVec achieves a 4.9x speedup over classic binary-search select baselines, running in 33.7 ns at uniform density by using a superblock-level sampling index that restricts sequential scans to L1-cache lookups. All implementations are validated against a correctness fuzzer executing over 78 million assertions with no failures. Source code and test harnesses are publicly available.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑