{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,26]],"date-time":"2026-09-26T11:59:36Z","timestamp":1790423976787,"version":"4.1.0"},"reference-count":77,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA1","license":[{"start":{"date-parts":[[2026,4,10]],"date-time":"2026-04-10T00:00:00Z","timestamp":1775779200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2026,4,10]]},"abstract":"<jats:p>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.<\/jats:p>\n                  <jats:p>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\u00d7 faster.<\/jats:p>","DOI":"10.1145\/3798263","type":"journal-article","created":{"date-parts":[[2026,4,10]],"date-time":"2026-04-10T14:33:43Z","timestamp":1775831623000},"page":"1737-1762","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Fail Faster: Staging and Fast Randomness for High-Performance PBT"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0009-0008-4456-9406","authenticated-orcid":false,"given":"Cynthia","family":"Richey","sequence":"first","affiliation":[{"name":"University of Pennsylvania, Philadelphia, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9399-9308","authenticated-orcid":false,"given":"Joseph W.","family":"Cutler","sequence":"additional","affiliation":[{"name":"University of Pennsylvania, Philadelphia, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9631-1169","authenticated-orcid":false,"given":"Harrison","family":"Goldstein","sequence":"additional","affiliation":[{"name":"University at Buffalo, Buffalo, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7839-1636","authenticated-orcid":false,"given":"Benjamin C.","family":"Pierce","sequence":"additional","affiliation":[{"name":"University of Pennsylvania, Philadelphia, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,4,10]]},"reference":[{"key":"e_1_3_1_2_2","unstructured":"2002. Macros. https:\/\/dotty.epfl.ch\/docs\/reference\/metaprogramming\/macros.html. Accessed: 2025-03-17."},{"key":"e_1_3_1_3_2","unstructured":"2007. A small noncryptographic pseudorandom number generator. https:\/\/burtleburtle.net\/bob\/rand\/smallprng.html. Accessed: 2025-03-24."},{"key":"e_1_3_1_4_2","unstructured":"2021. ScalaCheck. https:\/\/scalacheck.org\/. Accessed: 2025-03-24."},{"key":"e_1_3_1_5_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-031-52038-9_5"},{"key":"e_1_3_1_6_2","unstructured":"Stefan Ackermann Vojin Jovanovic Tiark Rompf and Martin Odersky. 2012. Jet: An Embedded DSL for High Performance Big Data Processing. https:\/\/infoscience.epfl.ch\/handle\/20.500.14299\/85985"},{"key":"e_1_3_1_7_2","unstructured":"Apple Inc. 2023. Macros. https:\/\/docs.swift.org\/swift-book\/documentation\/the-swift-programming-language\/macros\/. Accessed: 2025-10-07."},{"key":"e_1_3_1_8_2","first-page":"4","volume-title":"Partial Evaluation and Semantic-Based Program Manipulation.","author":"Bawden Alan","year":"1999","unstructured":"Alan Bawden. 1999. Quasiquotation in Lisp. In Partial Evaluation and Semantic-Based Program Manipulation. 4\u201312. citeseer.ist.psu.edu\/bawden99quasiquotation.html"},{"key":"e_1_3_1_9_2","unstructured":"David Blackman and Sebastiano Vigna. 2022. Scrambled Linear Pseudorandom Number Generators. arXiv:1805.01407 [cs.DS] https:\/\/arxiv.org\/abs\/1805.01407"},{"key":"e_1_3_1_10_2","doi-asserted-by":"publisher","DOI":"10.1145\/141471.141483"},{"key":"e_1_3_1_11_2","unstructured":"Rudy Braquehais Michael Walker Jos\u00e9 Manuel Calder\u00f3n Trilla and Colin Runciman. 2017. A simple incremental development of a property-based testing tool (Functional Pearl). (2017)."},{"key":"e_1_3_1_12_2","unstructured":"Bytheway Cameron. 2025. Bolero. https:\/\/camshaft.github.io\/bolero\/. Accessed: 2025-03-24."},{"key":"e_1_3_1_13_2","doi-asserted-by":"publisher","DOI":"10.1007\/11561347_18"},{"key":"e_1_3_1_14_2","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796815000143"},{"key":"e_1_3_1_15_2","doi-asserted-by":"publisher","DOI":"10.1145\/351240.351266"},{"key":"e_1_3_1_16_2","doi-asserted-by":"publisher","DOI":"10.1145\/351240.351266"},{"key":"e_1_3_1_17_2","unstructured":"Clojure Contributors. 2025. test.check. https:\/\/github.com\/clojure\/test.check. Accessed: 2025-10-07."},{"key":"e_1_3_1_18_2","doi-asserted-by":"publisher","DOI":"10.1145\/3011069"},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","DOI":"10.1145\/382780.382785"},{"key":"e_1_3_1_20_2","unstructured":"Richard A. Eisenberg Stephen Dolan and Leo White. 2022. Unboxed types for OCaml. https:\/\/www.youtube.com\/watch?v=Vevld4cXSYk."},{"key":"e_1_3_1_21_2","doi-asserted-by":"publisher","DOI":"10.1145\/2063176.2063195"},{"key":"e_1_3_1_22_2","unstructured":"FsCheck Team. 2025. FsCheck: Random Testing for .NET. https:\/\/fscheck.github.io\/FsCheck\/. Accessed: 2025-03-24."},{"key":"e_1_3_1_23_2","doi-asserted-by":"publisher","DOI":"10.1145\/165180.165214"},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3639581"},{"key":"e_1_3_1_25_2","doi-asserted-by":"publisher","DOI":"10.1145\/3563291"},{"key":"e_1_3_1_26_2","doi-asserted-by":"publisher","DOI":"10.7551\/mitpress\/1090.001.0001"},{"key":"e_1_3_1_27_2","unstructured":"Hypothesis Team. 2025. Hypothesis. https:\/\/hypothesis.works\/. Accessed: 2025-03-24."},{"key":"e_1_3_1_28_2","unstructured":"Intel Corporation. 2025. Intel\u00ae Processor Trace. https:\/\/edc.intel.com\/content\/www\/us\/en\/design\/products\/platforms\/processor-and-core-i3-n-series-datasheet-volume-1-of-2\/001\/intel-processor-trace\/. Accessed: 2025-03-24."},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","DOI":"10.5555\/153676"},{"key":"e_1_3_1_30_2","doi-asserted-by":"publisher","DOI":"10.1145\/2660193.2660241"},{"key":"e_1_3_1_31_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-07151-0_6"},{"key":"e_1_3_1_32_2","unstructured":"Oleg Kiselyov. 2023. MetaOCaml Theory and Implementation. arXiv: 2309.08207 [cs.PL] https:\/\/arxiv.org\/abs\/2309.08207"},{"key":"e_1_3_1_33_2","doi-asserted-by":"publisher","DOI":"10.1145\/3093333.3009880"},{"key":"e_1_3_1_34_2","unstructured":"Oleg Kiselyov and Jeremy Yallop. 2022. let (rec) insertion without Effects Lights or Magic. arXiv:2201.00495 [cs.PL] https:\/\/arxiv.org\/abs\/2201.00495"},{"key":"e_1_3_1_35_2","doi-asserted-by":"publisher","DOI":"10.1145\/3674648"},{"key":"e_1_3_1_36_2","unstructured":"Shriram Krishnamurthi and Matthias Felleisen. 2001. Linguistic reuse. Ph.D. Dissertation. AAI3021152."},{"key":"e_1_3_1_37_2","doi-asserted-by":"publisher","DOI":"10.1145\/3314221.3314625"},{"key":"e_1_3_1_38_2","doi-asserted-by":"publisher","DOI":"10.1145\/3652561.3652570"},{"key":"e_1_3_1_39_2","first-page":"114","article-title":"Beginner\u2019s Luck: A Language for Property-Based Generators","author":"Lampropoulos Leonidas","year":"2017","unstructured":"Leonidas Lampropoulos, Diane Gallois-Wong, Catalin Hritcu, John Hughes, Benjamin C. Pierce, and Li-yao Xia. 2017. Beginner\u2019s Luck: A Language for Property-Based Generators. Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017 (2017), 114\u2013129.","journal-title":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017"},{"key":"e_1_3_1_40_2","doi-asserted-by":"publisher","DOI":"10.1145\/3360607"},{"key":"e_1_3_1_41_2","doi-asserted-by":"publisher","DOI":"10.1145\/3158133"},{"key":"e_1_3_1_42_2","unstructured":"Daniel Lemire. 2023. testingRNG. https:\/\/github.com\/lemire\/testingRNG."},{"key":"e_1_3_1_43_2","doi-asserted-by":"publisher","DOI":"10.1145\/3092703.3092711"},{"issue":"1","key":"e_1_3_1_44_2","first-page":"100","article-title":"Differential testing for software","volume":"10","author":"McKeeman William M","year":"1998","unstructured":"William M McKeeman. 1998. Differential testing for software. Digital Technical Journal 10, 1 (1998), 100\u2013107.","journal-title":"Digital Technical Journal"},{"key":"e_1_3_1_45_2","unstructured":"Microsoft. 2025. Code Quotations \u2014 F# | Microsoft Learn. https:\/\/learn.microsoft.com\/en-us\/dotnet\/fsharp\/language-reference\/code-quotations. Accessed: 2025-03-24."},{"key":"e_1_3_1_46_2","volume-title":"Real World OCaml: Functional Programming for the Masses","author":"Minsky Yaron","year":"2022","unstructured":"Yaron Minsky and Anil Madhavapeddy. 2022. Real World OCaml: Functional Programming for the Masses. \"O\u2019Reilly Media, Inc.\"."},{"key":"e_1_3_1_47_2","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(91)90052-4"},{"key":"e_1_3_1_48_2","doi-asserted-by":"publisher","DOI":"10.1145\/3428236"},{"key":"e_1_3_1_49_2","doi-asserted-by":"publisher","DOI":"10.1145\/1352582.1352591"},{"key":"e_1_3_1_50_2","doi-asserted-by":"publisher","DOI":"10.5555\/130665"},{"key":"e_1_3_1_51_2","unstructured":"openjdk. 2023. Java Microbenchmarking Harness. https:\/\/github.com\/openjdk\/jmh."},{"key":"e_1_3_1_52_2","doi-asserted-by":"publisher","DOI":"10.1145\/3136040.3136043"},{"key":"e_1_3_1_53_2","doi-asserted-by":"publisher","DOI":"10.5075\/epfl-thesis-10285"},{"key":"e_1_3_1_54_2","doi-asserted-by":"publisher","DOI":"10.1145\/362848.362860"},{"key":"e_1_3_1_55_2","unstructured":"Proptest Contributors. 2025. The Proptest Book. https:\/\/altsysrq.github.io\/proptest-book\/. Accessed: 2025-03-24."},{"key":"e_1_3_1_56_2","doi-asserted-by":"publisher","unstructured":"Cynthia Richey Joseph Cutler Harrison Goldstein and Benjamin Pierce. 2026. Artifact for Fail Faster: Staging and Fast Randomness for High-Performance PBT. doi:10.5281\/zenodo.18764519","DOI":"10.5281\/zenodo.18764519"},{"key":"e_1_3_1_57_2","doi-asserted-by":"publisher","DOI":"10.1145\/2184319.2184345"},{"key":"e_1_3_1_58_2","doi-asserted-by":"publisher","DOI":"10.1145\/1543134.1411292"},{"key":"e_1_3_1_59_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-46669-8_33"},{"key":"e_1_3_1_60_2","doi-asserted-by":"publisher","DOI":"10.1145\/331960.331975"},{"key":"e_1_3_1_61_2","doi-asserted-by":"publisher","DOI":"10.1145\/581690.581691"},{"key":"e_1_3_1_62_2","doi-asserted-by":"publisher","DOI":"10.1145\/3607860"},{"key":"e_1_3_1_63_2","doi-asserted-by":"publisher","DOI":"10.1145\/2660193.2660195"},{"key":"e_1_3_1_64_2","doi-asserted-by":"publisher","DOI":"10.1145\/3540250.3549139"},{"key":"e_1_3_1_65_2","unstructured":"Jane Street. 2021. Base Quickcheck. https:\/\/github.com\/janestreet\/base_quickcheck."},{"key":"e_1_3_1_66_2","unstructured":"Jane Street. 2023. Core bench. https:\/\/github.com\/janestreet\/core_bench."},{"key":"e_1_3_1_67_2","unstructured":"SwiftCheck Contributors. 2025. SwiftCheck. https:\/\/github.com\/typelift\/SwiftCheck. Accessed: 2025-10-07."},{"key":"e_1_3_1_68_2","doi-asserted-by":"publisher","DOI":"10.1016\/S0304-3975(00)00053-0"},{"key":"e_1_3_1_69_2","doi-asserted-by":"publisher","DOI":"10.1145\/1993498.1993514"},{"key":"e_1_3_1_70_2","doi-asserted-by":"publisher","DOI":"10.1145\/1391956.1391958"},{"key":"e_1_3_1_71_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-70594-9_20"},{"issue":"36","key":"e_1_3_1_72_2","first-page":"3","article-title":"Various Techniques Used in Connection with Random Digits","volume":"12","author":"Von Neumann John","year":"1951","unstructured":"John Von Neumann. 1951. Various Techniques Used in Connection with Random Digits. Appl. Math Ser 12, 36-38 (1951), 3.","journal-title":"Appl. Math Ser"},{"key":"e_1_3_1_73_2","doi-asserted-by":"publisher","DOI":"10.1145\/1806596.1806642"},{"key":"e_1_3_1_74_2","doi-asserted-by":"publisher","DOI":"10.1145\/3409002"},{"key":"e_1_3_1_75_2","doi-asserted-by":"publisher","DOI":"10.1145\/3607851"},{"key":"e_1_3_1_76_2","doi-asserted-by":"publisher","DOI":"10.1145\/3236795"},{"key":"e_1_3_1_77_2","doi-asserted-by":"publisher","DOI":"10.1145\/3591269"},{"key":"e_1_3_1_78_2","unstructured":"Wang Yi. 2021. wyhash. https:\/\/github.com\/wangyi-fudan\/wyhash."}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3798263","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,26]],"date-time":"2026-09-26T11:21:44Z","timestamp":1790421704000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3798263"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,4,10]]},"references-count":77,"journal-issue":{"issue":"OOPSLA1","published-print":{"date-parts":[[2026,4,10]]}},"alternative-id":["10.1145\/3798263"],"URL":"https:\/\/doi.org\/10.1145\/3798263","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,4,10]]},"assertion":[{"value":"2025-10-10","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-02-17","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-04-10","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}