A fast in-place interpreter for WebAssembly

A fast in-place interpreter for WebAssembly
复制标题

WebAssembly 的快速就地解释器

DOI:
10.1145/3563311
复制
发表时间:
2022
影响因子:
--
通讯作者:
Titzer, Ben L.
Titzer, Ben L.
中科院分区:
--
文献类型:
--
作者:
Titzer, Ben L.

文献摘要

参考文献

被引文献

相似文献

WebAssembly (Wasm) 是一种紧凑、规范明确的字节码格式,提供具有接近本机执行速度的可移植编译目标。字节码格式经过专门设计,可以快速解析、验证和编译,将自身定位为本机代码的可移植替代方案。它显然不是为直接解释而设计的。相反,当时的设计考虑重点是与本机代码竞争,利用优化编译器作为主要执行层。然而,在 JIT 场景中,编译时间和内存消耗严重影响应用程序启动,导致许多 Wasm 引擎后来部署更快的单遍(基线)编译器。尽管速度更快,但基线编译器仍然需要时间并浪费不经常执行的代码的代码空间。典型的解释器是不可行的,一些引擎不会将 Wasm 编译为机器代码,而是编译为更紧凑但易于解释的格式。这仍然需要时间并且浪费内存。相反,我们在本文中介绍了一种用于 WebAssembly 的快速就地解释器,无需重写,也无需单独的格式。我们的评估表明,Wasm 代码的就地解释既节省空间又快速,其性能与解释定制设计的内部格式相当。这填补了 Wasm 执行层空间中的一个漏洞,与以前的引擎配置相比,可以实现更快的启动和更低的内存占用。
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.
通过选择性内联优化直接线程代码
DOI: 10.1145/277650.277743
发表时间: 1998
期刊: Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation
影响因子: --
作者:
Ian Piumarta;F. Riccardi
通讯作者: F. Riccardi
动态语言基于跟踪的即时类型专业化
DOI: 10.1145/1542476.1542528
发表时间: 2009
影响因子: 19
作者:
A. Gal;Brendan Eich;Mike Shaver;David Anderson;David Mandelin;M. Haghighat;Blake Kaplan;Graydon Hoare;B. Zbarsky;Jason Orendorff;J. Ruderman;Edwin W. Smith;Rick Reitmaier;Michael Bebenita;Mason Chang;M. Franz
通讯作者: M. Franz
具有上下文线程的混合模式执行
DOI: --
发表时间: 2005
期刊: Conference of the Centre for Advanced Studies on Collaborative Research
影响因子: --
作者:
Mathew Zaleski;Marc Berndl;Angela Demke Brown
通讯作者: Angela Demke Brown
ThingSpire OS:基于 WebAssembly 的物联网操作系统,用于云边集成
DOI: --
发表时间: 2021
期刊: ACM SIGMOBILE International Conference on Mobile Systems, Applications, and Services
影响因子: --
作者:
Borui Li;Hongchang Fan;Yi Gao;Wei Dong
通讯作者: Wei Dong
堆栈缓存解释器的状态之间的代码共享
DOI: --
发表时间: 2004
期刊: Workshop on Interpreters, Virtual Machines and Emulators
影响因子: --
作者:
Jinzhan Peng;Gansha Wu;Guei
通讯作者: Guei