Challenging Sequential Bitstream Processing via Principled Bitwise Speculation
Junqiao Qiu, Lin Jiang, Zhijia Zhao
Abstract
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Interleaved Bitstream Execution for Multi-Pattern Regex Matching on GPUs cites Scalable FSM parallelization via path fusion and higher-order speculation
- JSONSki: streaming semi-structured data with bit-parallel fast-forwarding cites Scalable Structural Index Construction for JSON Analytics
- Scalable FSM parallelization via path fusion and higher-order speculation cites Scalable Structural Index Construction for JSON Analytics
Cited by top-tier papers5
- Forerunner: Constraint-based Speculative Transaction Execution for EthereumYang Chen, Zhongxin Guo, Runhuai Li, Shuo Chen et al.SOSP 2021 · 18 citations
- Scalable Structural Index Construction for JSON AnalyticsLin Jiang, Junqiao Qiu, Zhijia ZhaoVLDB 2021 · 16 citations
- Scalable FSM parallelization via path fusion and higher-order speculationJunqiao Qiu, Xiaofan Sun, Amir Hossein Nodehi Sabet, Zhijia ZhaoASPLOS 2021 · 16 citations
- JSONSki: streaming semi-structured data with bit-parallel fast-forwardingLin Jiang, Zhijia ZhaoASPLOS 2022 · 13 citations
- Interleaved Bitstream Execution for Multi-Pattern Regex Matching on GPUsTianao Ge, Xiaowen Chu, Hongyuan LiuMICRO 2025 · 4 citations
Related papers
- Scaling out speculative execution of finite-state machines with parallel mergeYang Xia, Peng Jiang, Gagan AgrawalPPoPP 2020 · 10 citations
- Interactive Bitvector Reasoning using Verified Bit-BlastingHenrik Böving, Siddharth Bhat, Luisa Cicolini, Alex C. Keizer et al.OOPSLA 2025 · 3 citations
- An Efficient Algorithm for Continuous Complex Event Matching Using Bit-ParallelismTao Qiu, Shenwang Jiang, Xiaochun Yang, Bin Wang et al.ICDE 2024 · 5 citations
- Saving Energy with Per-Variable Bitwidth SpeculationTommy McMichen, David Dlott, Panitan Wongse-ammat, Nathan Greiner et al.ASPLOS 2025
- Dynamic dispatch of context-sensitive optimizationsGabriel Poesia, Fernando Magno Quintão PereiraOOPSLA 2020 · 7 citations
