A fast in-place interpreter for WebAssembly

Author:

Titzer Ben L.1ORCID

Affiliation:

1. Carnegie Mellon University, USA

Abstract

WebAssembly (Wasm) is a compact, well-specified bytecode format that offers a portable compilation target with near-native execution speed. The bytecode format was specifically designed to be fast to parse, validate, and compile, positioning itself as a portable alternative to native code. It was pointedly not designed to be interpreted directly. Instead, design considerations at the time focused on competing with native code, utilizing optimizing compilers as the primary execution tier. Yet, in JIT scenarios, compilation time and memory consumption critically impact application startup, leading many Wasm engines to later deploy faster single-pass (baseline) compilers. Though faster, baseline compilers still take time and waste code space for infrequently executed code. A typical interpreter being infeasible, some engines resort to compiling Wasm not to machine code, but to a more compact, but easy to interpret format. This still takes time and wastes memory. Instead, we introduce in this article a fast in-place interpreter for WebAssembly, where no rewrite and no separate format is necessary. Our evaluation shows that in-place interpretation of Wasm code is space-efficient and fast, achieving performance on-par with interpreting a custom-designed internal format. This fills a hole in the execution tier space for Wasm, allowing for even faster startup and lower memory footprint than previous engine configurations.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference73 articles.

1. 1998. Hotspot internals: interpreter. https://openjdk.java.net/groups/hotspot/docs/RuntimeOverview.html (Accessed 2022-4-07) 1998. Hotspot internals: interpreter. https://openjdk.java.net/groups/hotspot/docs/RuntimeOverview.html (Accessed 2022-4-07)

2. 2015. lli - directly execute programs from LLVM bitcode. https://llvm.org/docs/CommandGuide/lli.html (Accessed 2022-4-12) 2015. lli - directly execute programs from LLVM bitcode. https://llvm.org/docs/CommandGuide/lli.html (Accessed 2022-4-12)

3. 2018. https://v8.dev/blog/liftoff (Accessed 2022-4-07) 2018. https://v8.dev/blog/liftoff (Accessed 2022-4-07)

4. 2018. TurboFan: V8’s Optimizing Compiler. https://v8.dev/docs/turbofan (Accessed 2021-07-29) 2018. TurboFan: V8’s Optimizing Compiler. https://v8.dev/docs/turbofan (Accessed 2021-07-29)

5. 2018. WAVM: a non-browser WebAssembly virtual machine. https://github.com/WAVM/WAVM (Accessed 2022-1-10) 2018. WAVM: a non-browser WebAssembly virtual machine. https://github.com/WAVM/WAVM (Accessed 2022-1-10)

Cited by 9 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. BIFROST: A Future Graph Database Runtime;2024 IEEE 40th International Conference on Data Engineering (ICDE);2024-05-13

2. Flexible Non-intrusive Dynamic Instrumentation for WebAssembly;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3;2024-04-27

3. Whose Baseline Compiler is it Anyway?;2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO);2024-03-02

4. On Abstract Machines Security and Performance;Procedia Computer Science;2024

5. AST vs. Bytecode: Interpreters in the Age of Meta-Compilation;Proceedings of the ACM on Programming Languages;2023-10-16

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3