{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,24]],"date-time":"2026-02-24T16:51:40Z","timestamp":1771951900188,"version":"3.50.1"},"reference-count":50,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","license":[{"start":{"date-parts":[[2023,10,16]],"date-time":"2023-10-16T00:00:00Z","timestamp":1697414400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100000266","name":"Engineering and Physical Sciences Research Council","doi-asserted-by":"publisher","award":["EP\/V007165\/1"],"award-info":[{"award-number":["EP\/V007165\/1"]}],"id":[{"id":"10.13039\/501100000266","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/501100000288","name":"Royal Society","doi-asserted-by":"publisher","award":["INF\\R1\\211001"],"award-info":[{"award-number":["INF\\R1\\211001"]}],"id":[{"id":"10.13039\/501100000288","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2023,10,16]]},"abstract":"<jats:p>Thanks to partial evaluation and meta-tracing, it became practical to build language implementations that reach state-of-the-art peak performance by implementing only an interpreter. Systems such as RPython and GraalVM provide components such as a garbage collector and just-in-time compiler in a language-agnostic manner, greatly reducing implementation effort.<\/jats:p>\n          <jats:p>However, meta-compilation-based language implementations still need to improve further to reach the low memory use and fast warmup behavior that custom-built systems provide. A key element in this endeavor is interpreter performance. Folklore tells us that bytecode interpreters are superior to abstract-syntax-tree (AST) interpreters both in terms of memory use and run-time performance.<\/jats:p>\n          <jats:p>This work assesses the trade-offs between AST and bytecode interpreters to verify common assumptions and whether they hold  \nin the context of meta-compilation systems. We implemented four interpreters, each an AST and a bytecode one using RPython and GraalVM. We keep the difference between the interpreters as small as feasible to be able to evaluate interpreter performance, peak performance, warmup, memory use, and the impact of individual optimizations.<\/jats:p>\n          <jats:p>Our results show that both systems indeed reach performance close to Node.js\/V8. Looking at interpreter-only performance,  \nour AST interpreters are on par with, or even slightly faster than their bytecode counterparts. After just-in-time compilation, the results are roughly on par. This means bytecode interpreters do not have their widely assumed performance advantage. However, we can confirm that bytecodes are more compact in memory than ASTs, which becomes relevant for larger applications. However, for smaller applications, we noticed that bytecode interpreters allocate more memory because boxing avoidance is not as applicable, and because the bytecode interpreter structure requires memory, e.g., for a reified stack.<\/jats:p>\n          <jats:p>Our results show AST interpreters to be competitive on top of meta-compilation systems. Together with possible engineering benefits, they should thus not be discounted so easily in favor of bytecode interpreters.<\/jats:p>","DOI":"10.1145\/3622808","type":"journal-article","created":{"date-parts":[[2023,10,16]],"date-time":"2023-10-16T15:41:29Z","timestamp":1697470889000},"page":"318-346","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":8,"title":["AST vs. Bytecode: Interpreters in the Age of Meta-Compilation"],"prefix":"10.1145","volume":"7","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-4683-9883","authenticated-orcid":false,"given":"Octave","family":"Larose","sequence":"first","affiliation":[{"name":"University of Kent, Canterbury, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9817-1494","authenticated-orcid":false,"given":"Sophie","family":"Kaleba","sequence":"additional","affiliation":[{"name":"University of Kent, Canterbury, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4728-5819","authenticated-orcid":false,"given":"Humphrey","family":"Burchell","sequence":"additional","affiliation":[{"name":"University of Kent, Canterbury, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9059-5180","authenticated-orcid":false,"given":"Stefan","family":"Marr","sequence":"additional","affiliation":[{"name":"University of Kent, Canterbury, UK"}]}],"member":"320","published-online":{"date-parts":[[2023,10,16]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/857076.857077"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/358438.349303"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133876"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/362248.362270"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/1565824.1565827"},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/2509136.2509531"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2013.02.001"},{"key":"e_1_2_2_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/1899661.1869633"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-14107-2_21"},{"key":"e_1_2_2_10_1","volume-title":"Multi-Level Quickening: Ten Years Later. CoRR, abs\/2109.02958","author":"Brunthaler Stefan","year":"2021","unstructured":"Stefan Brunthaler . 2021. Multi-Level Quickening: Ten Years Later. CoRR, abs\/2109.02958 ( 2021 ), 47 pages. arXiv:2109.02958. arxiv:2109.02958 Stefan Brunthaler. 2021. Multi-Level Quickening: Ten Years Later. CoRR, abs\/2109.02958 (2021), 47 pages. arXiv:2109.02958. arxiv:2109.02958"},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/74878.74884"},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-89275-5_8"},{"key":"e_1_2_2_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/207110.207165"},{"key":"e_1_2_2_14_1","first-page":"1","article-title":"The Structure and Performance of Efficient Interpreters","volume":"5","author":"Anton Ertl M.","year":"2003","unstructured":"M. Anton Ertl and David Gregg . 2003 . The Structure and Performance of Efficient Interpreters . Journal of Instruction-Level Parallelism , 5 (2003), November , 1 \u2013 25 . http:\/\/www.jilp.org\/vol5\/v5paper12.pdf M. Anton Ertl and David Gregg. 2003. The Structure and Performance of Efficient Interpreters. Journal of Instruction-Level Parallelism, 5 (2003), November, 1\u201325. http:\/\/www.jilp.org\/vol5\/v5paper12.pdf","journal-title":"Journal of Instruction-Level Parallelism"},{"key":"e_1_2_2_15_1","doi-asserted-by":"publisher","DOI":"10.1023\/A:1010095604496"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/1134760.1134780"},{"key":"e_1_2_2_17_1","volume-title":"Design Patterns: Elements of Reusable Object-Oriented Software","author":"Gamma Erich","year":"1994","unstructured":"Erich Gamma , Richard Helm , Ralph Johnson , and John Vlissides . 1994 . Design Patterns: Elements of Reusable Object-Oriented Software ( 1 st ed.). Addison-Wesley Professional . isbn:978-0201633610 Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1994. Design Patterns: Elements of Reusable Object-Oriented Software (1st ed.). Addison-Wesley Professional. isbn:978-0201633610","edition":"1"},{"key":"e_1_2_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/3201898"},{"key":"e_1_2_2_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/1822090.1822098"},{"key":"e_1_2_2_20_1","unstructured":"Christian Humer and Nikola Bebi\u0107. 2022. Operation DSL: How We Learned to Stop Worrying and Love Bytecodes again.. https:\/\/2022.ecoop.org\/details\/truffle-2022\/3\/Operation-DSL-How-We-Learned-to-Stop-Worrying-and-Love-Bytecodes-again Truffle Workshop \u201922 Presentation \t\t\t\t  Christian Humer and Nikola Bebi\u0107. 2022. Operation DSL: How We Learned to Stop Worrying and Love Bytecodes again.. https:\/\/2022.ecoop.org\/details\/truffle-2022\/3\/Operation-DSL-How-We-Learned-to-Stop-Worrying-and-Love-Bytecodes-again Truffle Workshop \u201922 Presentation"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/2658761.2658776"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0057013"},{"key":"e_1_2_2_23_1","doi-asserted-by":"publisher","DOI":"10.5381\/jot.2022.21.2.a1"},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/3563834.3567538"},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/2576195.2576205"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/3473596"},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-75333-7_3"},{"key":"e_1_2_2_28_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.8333815"},{"key":"e_1_2_2_29_1","volume-title":"Workshop","author":"Larose Octave","year":"2022","unstructured":"Octave Larose , Sophie Kaleba , and Stefan Marr . 2022 . Less Is More: Merging AST Nodes To Optimize Interpreters. MoreVMs \u201922 Workshop , Presentation Octave Larose, Sophie Kaleba, and Stefan Marr. 2022. Less Is More: Merging AST Nodes To Optimize Interpreters. MoreVMs \u201922 Workshop, Presentation"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.1311762"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/2989225.2989232"},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/2814270.2814275"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/3242947.3242948"},{"key":"e_1_2_2_34_1","doi-asserted-by":"publisher","DOI":"10.1109\/CGO51591.2021.9370314"},{"key":"e_1_2_2_35_1","doi-asserted-by":"publisher","DOI":"10.25932\/publishup-49913"},{"key":"e_1_2_2_36_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2016.08.003"},{"key":"e_1_2_2_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/2816707.2816716"},{"key":"e_1_2_2_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/277650.277743"},{"key":"e_1_2_2_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/199448.199526"},{"key":"e_1_2_2_40_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2018.16"},{"key":"e_1_2_2_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328195.1328197"},{"key":"e_1_2_2_42_1","doi-asserted-by":"publisher","DOI":"10.1145\/3563311"},{"key":"e_1_2_2_43_1","doi-asserted-by":"publisher","DOI":"10.22152\/programming-journal.org\/2018\/2\/14"},{"key":"e_1_2_2_44_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2017.26"},{"key":"e_1_2_2_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3360610"},{"key":"e_1_2_2_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/2647508.2647517"},{"key":"e_1_2_2_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/3062341.3062381"},{"key":"e_1_2_2_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/2509578.2509581"},{"key":"e_1_2_2_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/2384577.2384587"},{"key":"e_1_2_2_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/3568973"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3622808","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3622808","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T16:37:04Z","timestamp":1750178224000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3622808"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,10,16]]},"references-count":50,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2023,10,16]]}},"alternative-id":["10.1145\/3622808"],"URL":"https:\/\/doi.org\/10.1145\/3622808","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,10,16]]},"assertion":[{"value":"2023-10-16","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}