Challenging Sequential Bitstream Processing via Principled Bitwise Speculation
Junqiao Qiu, Lin Jiang, Zhijia Zhao
摘要
Many performance-critical applications traverse bitstreams with bitwise computations for better performance or higher space efficiency, such as multimedia processing and bitmap indexing. However, when these bitwise computations carry dependences, the entire bitstream traversal becomes serial, fundamentally limiting the scalability. In this work, we show that bitstream-carried dependences are actually "breakable" in many cases, with the adoption of a systematic treatment - principled bitwise speculation (PBS). The core idea of PBS stems from an analogy drawn between bitstream programs and sequential circuits, both of which transform binary sequences. In this new perspective, it becomes natural to model the dependences in bitstream programs with finite-state machines (FSM), a basic model for sequential circuits. To achieve this, PBS features an assembly of static analyses that reason about bitstream programs down to the bit level to identify the bits causing dependences, then it treats the value combinations of dependent bits as states to construct FSMs. The modeling, for the first time, enables the use of FSM speculation techniques to parallelize bitstream programs. Basically, by leveraging the state convergence of FSMs, the values of dependent bits can be predicted with much higher accuracies. In cases the prediction fails, PBS tries to directly "rectify" the wrong outputs based on bitwise logic, minimizing the mis-speculation costs. In addition, FSM shows even higher execution efficiency than the original program in some cases, making itself an optimized version to accelerate serial bitstream processing. We prototyped PBS using LLVM. Evaluation with real-world bitstream programs confirms the effectiveness of PBS, showing up to near-linear speedup on multicore/manycore machines.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Interleaved Bitstream Execution for Multi-Pattern Regex Matching on GPUs 引用了 Scalable FSM parallelization via path fusion and higher-order speculation
- JSONSki: streaming semi-structured data with bit-parallel fast-forwarding 引用了 Scalable Structural Index Construction for JSON Analytics
- Scalable FSM parallelization via path fusion and higher-order speculation 引用了 Scalable Structural Index Construction for JSON Analytics
引用它的顶会 Paper5
- Forerunner: Constraint-based Speculative Transaction Execution for EthereumYang Chen, Zhongxin Guo, Runhuai Li, Shuo Chen 等SOSP 2021 · 18 次引用
- Scalable Structural Index Construction for JSON AnalyticsLin Jiang, Junqiao Qiu, Zhijia ZhaoVLDB 2021 · 16 次引用
- Scalable FSM parallelization via path fusion and higher-order speculationJunqiao Qiu, Xiaofan Sun, Amir Hossein Nodehi Sabet, Zhijia ZhaoASPLOS 2021 · 16 次引用
- JSONSki: streaming semi-structured data with bit-parallel fast-forwardingLin Jiang, Zhijia ZhaoASPLOS 2022 · 13 次引用
- Interleaved Bitstream Execution for Multi-Pattern Regex Matching on GPUsTianao Ge, Xiaowen Chu, Hongyuan LiuMICRO 2025 · 4 次引用
相关 Paper
- Scaling out speculative execution of finite-state machines with parallel mergeYang Xia, Peng Jiang, Gagan AgrawalPPoPP 2020 · 10 次引用
- Interactive Bitvector Reasoning using Verified Bit-BlastingHenrik Böving, Siddharth Bhat, Luisa Cicolini, Alex C. Keizer 等OOPSLA 2025 · 3 次引用
- An Efficient Algorithm for Continuous Complex Event Matching Using Bit-ParallelismTao Qiu, Shenwang Jiang, Xiaochun Yang, Bin Wang 等ICDE 2024 · 5 次引用
- Saving Energy with Per-Variable Bitwidth SpeculationTommy McMichen, David Dlott, Panitan Wongse-ammat, Nathan Greiner 等ASPLOS 2025
- Dynamic dispatch of context-sensitive optimizationsGabriel Poesia, Fernando Magno Quintão PereiraOOPSLA 2020 · 7 次引用
