Lune

OOPSLA2026Top-tier venue

Fail Faster: Staging and Fast Randomness for High-Performance PBT

Cynthia Richey, Joseph W. Cutler, Harrison Goldstein, Benjamin C. Pierce

Abstract

Property-based testing (PBT) relies on generators for random test cases, often constructed using embedded domain specific languages, which provide expressive combinators for building and composing generators. The effectiveness of PBT depends critically on the speed of these generators. However, careful measurements show that the generator performance of widely used PBT libraries falls well short of what is possible, due principally to ( 1) the abstraction overhead of their combinator-heavy style and (2) suboptimal sources of randomness. We characterize, quantify, and address these bottlenecks.

To eliminate abstraction overheads, we propose a technique based on multi-stage programming, dubbed Allegro. We apply this technique to leading generator libraries in OCaml and Scala 3, significantly improving performance. To quantify the performance impact of the randomness source, we carry out a controlled experiment, replacing the randomness in the OCaml PBT library with an optimized version. Both interventions exactly preserve the semantics of generators, enabling precise, pointwise comparisons. Together, these improvements find bugs up to 13× faster.

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.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Property-Based Testing in Practice cites Parsing randomness
  • Property-Based Testing in Practice cites Input invariants
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on5

  1. Input invariantsDominic Steinhöfel, Andreas ZellerFSE 2022 · 47 citations
  2. Property-Based Testing in PracticeHarrison Goldstein, Joseph W. Cutler, Daniel Dickstein, Benjamin C. Pierce et al.ICSE 2024 · 21 citations
  3. Parsing randomnessHarrison Goldstein, Benjamin C. PierceOOPSLA 2022 · 11 citations
  4. flap: A Deterministic Parser with Fused LexingJeremy Yallop, Ningning Xie, Neel KrishnaswamiPLDI 2023 · 10 citations
  5. Eliminating abstraction overhead of Java stream pipelines using ahead-of-time program optimizationAnders Møller, Oskar Haarklou VeileborgOOPSLA 2020 · 9 citations

Related papers

  1. Tuning Random Generators: Property-Based Testing as Probabilistic ProgrammingRyan Tjoa, Poorva Garg, Harrison Goldstein, Todd D. Millstein et al.OOPSLA 2025 · 2 citations
  2. Generating Well-Typed Terms That Are Not "Useless"Justin Frank, Benjamin Quiring, Leonidas LampropoulosPOPL 2024 · 9 citations
  3. Random Testing via Runtime Abstract InterpretationZain K Aamer, Benjamin C. PierceOOPSLA 2026 · 1 citation
  4. Designing New Operating Primitives to Improve Fuzzing PerformanceWen Xu, Sanidhya Kashyap, Changwoo Min, Taesoo KimCCS 2017 · 139 citations
  5. The Search for Constrained Random GeneratorsHarrison Goldstein, Hila Peleg, Cassia Torczon, Daniel Sainati et al.PLDI 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines