{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T11:08:22Z","timestamp":1784200102341,"version":"3.55.0"},"reference-count":85,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","funder":[{"name":"DFG - German Research Foundation","award":["448316946"],"award-info":[{"award-number":["448316946"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2025,10,9]]},"abstract":"<jats:p>Effect handlers are a programming language feature that has recently gained popularity. They allow for nonlocal yet structured control flow and subsume features like generators, exceptions, asynchronicity, etc. However, implementations of effect handlers currently often sacrifice features to enable efficient implementations. Meta-tracing just-in-time (JIT) compilers promise to yield the performance of a compiler by implementing an interpreter. They record execution in a trace, dynamically detect hot loops, and aggressively optimize those using information available at runtime. They excel at optimizing dynamic control flow, which is exactly what effect handlers introduce. We present the first evaluation of tracing JIT compilation specifically for effect handlers. To this end, we developed RPython-based tracing JIT implementations for Eff, Effekt, and Koka by compiling them to a common bytecode format. We evaluate the performance, discuss which classes of effectful programs are optimized well and how our additional optimizations influence performance. We also benchmark against a baseline of state-of-the-art mainstream language implementations.<\/jats:p>","DOI":"10.1145\/3763085","type":"journal-article","created":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T08:49:50Z","timestamp":1759999790000},"page":"978-1006","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["Tracing Just-in-Time Compilation for Effects and Handlers"],"prefix":"10.1145","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-0566-7632","authenticated-orcid":false,"given":"Marcial","family":"Gai\u00dfert","sequence":"first","affiliation":[{"name":"University of T\u00fcbingen, T\u00fcbingen, Germany"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4562-1356","authenticated-orcid":false,"given":"CF","family":"Bolz-Tereick","sequence":"additional","affiliation":[{"name":"Heinrich-Heine-Universit\u00e4t, D\u00fcsseldorf, Germany"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9128-0391","authenticated-orcid":false,"given":"Jonathan Immanuel","family":"Brachth\u00e4user","sequence":"additional","affiliation":[{"name":"University of T\u00fcbingen, T\u00fcbingen, Germany"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,10,9]]},"reference":[{"key":"e_1_3_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3689798"},{"key":"e_1_3_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/2384577.2384586"},{"key":"e_1_3_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/349299.349303"},{"key":"e_1_3_2_5_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jlamp.2014.02.001"},{"key":"e_1_3_2_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/2858949.2784740"},{"key":"e_1_3_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2784731.2784740"},{"key":"e_1_3_2_8_1","doi-asserted-by":"publisher","unstructured":"Spenser Bauman Carl Friedrich Bolz-Tereick Jeremy Siek and Sam Tobin-Hochstadt. 2017. Sound Gradual Typing: Only Mostly Dead. Proc. ACM Program. Lang. 1 OOPSLA Article 54 (oct 2017) 24 pages. doi:10.1145\/3133878","DOI":"10.1145\/3133878"},{"key":"e_1_3_2_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/2794078"},{"key":"e_1_3_2_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3158096"},{"key":"e_1_3_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/3371116"},{"key":"e_1_3_2_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/1929501.1929508"},{"key":"e_1_3_2_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/1565824.1565827"},{"key":"e_1_3_2_14_1","unstructured":"Jonathan Immanuel Brachth\u00e4user. 2024. A Brief History of Effekt for Fellow Researchers. https:\/\/effekt-lang.org\/evolution"},{"key":"e_1_3_2_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3428194"},{"key":"e_1_3_2_16_1","volume-title":"Programming with Implicit Values, Functions, and Control","author":"Brachth\u00e4user Jonathan Immanuel","year":"2019","unstructured":"Jonathan Immanuel Brachth\u00e4user and Daan Leijen. 2019. Programming with Implicit Values, Functions, and Control. Technical Report MSR-TR-2019-7. Microsoft Research."},{"key":"e_1_3_2_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236762"},{"key":"e_1_3_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/231379.231395"},{"key":"e_1_3_2_19_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2015.101"},{"key":"e_1_3_2_20_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796820000039"},{"key":"e_1_3_2_21_1","volume-title":"High performance implementation of Python for CLI\/.NET with JIT compiler generator for dynamic languages","author":"Cuni Antonio","year":"2010","unstructured":"Antonio Cuni. 2010. High performance implementation of Python for CLI\/.NET with JIT compiler generator for dynamic languages. Dottorato di Ricerca in Informatica. Universit\u00e0 degli Studi di Genova."},{"key":"e_1_3_2_22_1","unstructured":"Olivier Danvy and Andrzej Filinski. 1989. A functional abstraction of typed contexts. DIKU Rapport 89\/12 DIKU University of Copenhagen (1989)."},{"key":"e_1_3_2_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/91556.91622"},{"key":"e_1_3_2_24_1","volume-title":"Proceedings of the Symposium on Trends in Functional Programming","author":"Dolan Stephen","year":"2017","unstructured":"Stephen Dolan, Spiros Eliopoulos, Daniel Hillerstr\u00f6m, Anil Madhavapeddy, KC Sivaramakrishnan, and Leo White. 2017. Concurrent system programming with effect handlers. In Proceedings of the Symposium on Trends in Functional Programming. Springer LNCS 10788."},{"key":"e_1_3_2_25_1","unstructured":"Stephen Dolan Leo White KC Sivaramakrishnan Jeremy Yallop and Anil Madhavapeddy. 2015. Effective concurrency through algebraic effects. In OCaml Workshop."},{"key":"e_1_3_2_26_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796807006259"},{"key":"e_1_3_2_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/73560.73576"},{"key":"e_1_3_2_28_1","first-page":"193","volume-title":"Formal Description of Programming Concepts III","author":"Felleisen Matthias","year":"1986","unstructured":"Matthias Felleisen and Daniel P. Friedman. 1986. Control Operators, the SECD-machine, and the \u03bb-calculus. In Formal Description of Programming Concepts III. Elsevier (North-Holland), Amsterdam, 193\u2013217."},{"key":"e_1_3_2_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110257"},{"key":"e_1_3_2_30_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.FSCD.2021.16"},{"key":"e_1_3_2_31_1","doi-asserted-by":"publisher","unstructured":"Marcial Gai\u00dfert CF Bolz-Tereick and Jonathan Immanuel Brachth\u00e4user. 2025. Artifact of the paper \u2019Tracing Just-in-time Compilation for Effects and Handlers\u2019. doi:10.5281\/zenodo.16901452","DOI":"10.5281\/zenodo.16901452"},{"key":"e_1_3_2_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/1542476.1542528"},{"key":"e_1_3_2_33_1","unstructured":"Google. 2025. V8 JavaScript engine. https:\/\/v8.dev"},{"key":"e_1_3_2_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/1961295.1950412"},{"key":"e_1_3_2_35_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-02768-1_22"},{"key":"e_1_3_2_36_1","volume-title":"Formal Structures for Computation and Deduction (LIPIcs, Vol. 84)","author":"Hillerstr\u00f6m Daniel","year":"2017","unstructured":"Daniel Hillerstr\u00f6m, Sam Lindley, Bob Atkey, and KC Sivaramakrishnan. 2017. Continuation Passing Style for Effect Handlers. In Formal Structures for Computation and Deduction (LIPIcs, Vol. 84). Schloss Dagstuhl\u2013Leibniz-Zentrum f\u00fcr Informatik."},{"key":"e_1_3_2_37_1","unstructured":"Daniel Hillerstr\u00f6m Filip Koprivec and Philipp Schuster (benchmarking chairs). 2023. Effect handlers benchmarks suite. (2023). https:\/\/github.com\/effect-handlers\/effect-handlers-bench"},{"key":"e_1_3_2_38_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796820000040"},{"key":"e_1_3_2_39_1","unstructured":"Roberto Ierusalimschy Waldemar Celes and Luiz Henrique de Figueiredo. 2024. The Programming Language Lua. https:\/\/www.lua.org"},{"key":"e_1_3_2_40_1","unstructured":"Natsu Kagami. 2023. Implement delimited continuations primitives. https:\/\/github.com\/scala-native\/scala-native\/pull\/3286"},{"key":"e_1_3_2_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/2500365.2500590"},{"key":"e_1_3_2_42_1","doi-asserted-by":"publisher","unstructured":"Georgios Karachalias Filip Koprivec Matija Pretnar and Tom Schrijvers. 2021a. Compiler and replication of results: \"Efficient Compilation of Algebraic Effect Handlers\". https:\/\/doi.org\/10.5281\/zenodo.5497862 10.5281\/zenodo.5497862","DOI":"10.5281\/zenodo.5497862"},{"key":"e_1_3_2_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/3485479"},{"key":"e_1_3_2_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009880"},{"key":"e_1_3_2_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/2887747.2804319"},{"key":"e_1_3_2_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/1159803.1159808"},{"key":"e_1_3_2_47_1","unstructured":"Daan Leijen. 2016. Algebraic Effects for Functional Programming. Technical Report. MSR-TR-2016-29. Microsoft Research technical report."},{"key":"e_1_3_2_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/3122975.3122977"},{"key":"e_1_3_2_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/3093333.3009872"},{"key":"e_1_3_2_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/3571233"},{"key":"e_1_3_2_51_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009897"},{"key":"e_1_3_2_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3689770"},{"key":"e_1_3_2_53_1","doi-asserted-by":"publisher","DOI":"10.1145\/2989225.2989232"},{"key":"e_1_3_2_54_1","unstructured":"Matthew Fluet. [n.d.]. MLton. https:\/\/mlton.org [Last access: 21-10-2023]."},{"key":"e_1_3_2_55_1","unstructured":"Conor McBride. 2016. Shonky. https:\/\/github.com\/pigworker\/shonky"},{"key":"e_1_3_2_56_1","doi-asserted-by":"publisher","DOI":"10.1145\/3622831"},{"key":"e_1_3_2_57_1","volume-title":"From Capabilities to Regions: Enabling Efficient Compilation of Lexical Effect Handlers","author":"M\u00fcller Marius","year":"2023","unstructured":"Marius M\u00fcller, Philipp Schuster, Jonathan Lindegaard Starup, Klaus Ostermann, and Jonathan Immanuel Brachth\u00e4user. 2023. From Capabilities to Regions: Enabling Efficient Compilation of Lexical Effect Handlers. Extended Technical Report. University of T\u00fcbingen, Germany. https:\/\/se.informatik.uni-tuebingen.de\/publications\/mueller23lift."},{"key":"e_1_3_2_58_1","doi-asserted-by":"crossref","unstructured":"Minh Nguyen Roly Perera Meng Wang and Steven Ramsay. 2023. Effects and Effect Handlers for Programmable Inference. arXiv preprint arXiv:2303.01328 (2023).","DOI":"10.1145\/3609026.3609729"},{"key":"e_1_3_2_59_1","unstructured":"Martin Odersky. 2023. Strawman: Suspensions for algebraic effects. https:\/\/github.com\/scala\/scala3\/pull\/16739"},{"key":"e_1_3_2_60_1","unstructured":"OpenJS Foundation. 2025. Node.js \u2014Run JavaScript Everywhere. https:\/\/nodejs.org\/en"},{"key":"e_1_3_2_61_1","volume-title":"Java (TM) Virtual Machine Research and Technology Symposium (JVM 01)","author":"Paleczny Michael","year":"2001","unstructured":"Michael Paleczny, Christopher Vick, and Cliff Click. 2001. The Java HotSpot Server Compiler. In Java (TM) Virtual Machine Research and Technology Symposium (JVM 01). USENIX Association, Monterey, CA."},{"key":"e_1_3_2_62_1","unstructured":"Michael Pall. 2025. The LuaJITProject. https:\/\/luajit.org"},{"key":"e_1_3_2_63_1","unstructured":"David Peter. 2024. hyperfine. A command-line benchmarking tool. https:\/\/github.com\/sharkdp\/hyperfine [Last access: 29-07-2025]."},{"key":"e_1_3_2_64_1","doi-asserted-by":"publisher","unstructured":"Luna Phipps-Costin Andreas Rossberg Arjun Guha Daan Leijen Daniel Hillerstr\u00f6m KC Sivaramakrishnan Matija Pretnar and Sam Lindley. 2023. Continuing WebAssembly with Effect Handlers. 7 OOPSLA2 Article 238 (oct 2023) 26 pages. doi:10.1145\/3622814","DOI":"10.1145\/3622814"},{"key":"e_1_3_2_65_1","first-page":"133","volume-title":"Proceedings of the Haskell Symposium (Gothenburg, Sweden) (Haskell \u201914).","author":"van der Ploeg Atze","year":"2014","unstructured":"Atze van der Ploeg and Oleg Kiselyov. 2014. Reflection Without Remorse: Revealing a Hidden Sequence to Speed Up Monadic Reflection. In Proceedings of the Haskell Symposium (Gothenburg, Sweden) (Haskell \u201914). ACM, New York, NY, USA, 133\u2013144."},{"key":"e_1_3_2_66_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00590-9_7"},{"key":"e_1_3_2_67_1","doi-asserted-by":"publisher","DOI":"10.2168\/LMCS-9(4:23)2013"},{"key":"e_1_3_2_68_1","volume-title":"Efficient compilation of algebraic effects and handlers","author":"Pretnar Matija","year":"2017","unstructured":"Matija Pretnar, Amr Hany Shehata Saleh, Axel Faes, and Tom Schrijvers. 2017. Efficient compilation of algebraic effects and handlers. Technical Report. Department of Computer Science, KU Leuven; Leuven, Belgium."},{"key":"e_1_3_2_69_1","unstructured":"Python Software Foundation. 2025. . https:\/\/www.python.org\/"},{"key":"e_1_3_2_70_1","unstructured":"Armin Rigo Christian Tismer and Jason Madden. 2011. greenlet: Lightweight concurrent programming. https:\/\/greenlet.readthedocs.io\/en\/latest\/ [Last access: 21-08-2025]."},{"key":"e_1_3_2_71_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-89884-1_12"},{"key":"e_1_3_2_72_1","doi-asserted-by":"publisher","DOI":"10.1145\/3240719.3241788"},{"key":"e_1_3_2_73_1","doi-asserted-by":"publisher","DOI":"10.1145\/3519939.3523710"},{"key":"e_1_3_2_74_1","doi-asserted-by":"publisher","DOI":"10.1145\/3408975"},{"key":"e_1_3_2_75_1","unstructured":"Chung-chieh Shan. 2004. Shift to control. In Proceedings of the 5th workshop on Scheme and Functional Programming. 99\u2013107."},{"key":"e_1_3_2_76_1","doi-asserted-by":"publisher","DOI":"10.1145\/3607848"},{"key":"e_1_3_2_77_1","doi-asserted-by":"publisher","DOI":"10.1145\/3453483.3454039"},{"key":"e_1_3_2_78_1","doi-asserted-by":"publisher","DOI":"10.1145\/1596655.1596679"},{"key":"e_1_3_2_79_1","unstructured":"The PyPy Project. 2025. PyJitPl5. https:\/\/rpython.readthedocs.io\/en\/latest\/jit\/pyjitpl5.html [Last access: 21-08-2025]."},{"key":"e_1_3_2_80_1","unstructured":"Unison Computing. 2025. Introduction to Abilities: A Mental Model. https:\/\/www.unison-lang.org\/docs\/fundamentals\/abilities\/"},{"key":"e_1_3_2_81_1","doi-asserted-by":"publisher","DOI":"10.1145\/1159876.1159877"},{"key":"e_1_3_2_82_1","doi-asserted-by":"publisher","DOI":"10.1145\/2509578.2509581"},{"key":"e_1_3_2_83_1","doi-asserted-by":"publisher","DOI":"10.1145\/3473576"},{"key":"e_1_3_2_84_1","doi-asserted-by":"publisher","DOI":"10.1145\/2660193.2660223"},{"key":"e_1_3_2_85_1","doi-asserted-by":"publisher","DOI":"10.1145\/3290318"},{"key":"e_1_3_2_86_1","doi-asserted-by":"publisher","DOI":"10.1145\/3428207"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3763085","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T10:10:37Z","timestamp":1784196637000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3763085"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,10,9]]},"references-count":85,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2025,10,9]]}},"alternative-id":["10.1145\/3763085"],"URL":"https:\/\/doi.org\/10.1145\/3763085","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,10,9]]},"assertion":[{"value":"2025-03-26","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-08-12","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-10-09","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}