Back to articles
Speculative Optimizations for WebAssembly using Deopts and Inlining

Speculative Optimizations for WebAssembly using Deopts and Inlining

via V8 BlogDaniel Lehmann and Matthias Liedtke

In this blog post, we explain two optimizations for WebAssembly that we recently implemented in V8 and that shipped with Google Chrome M137, namely speculative call_indirect inlining and deoptimization support for WebAssembly. In combination, they allow us to generate better machine code by making assumptions based on runtime feedback. This speeds up WebAssembly execution, in particular for WasmGC programs. On a set of Dart microbenchmarks for example, the speedup by the combination of both optimizations is more than 50% on average, and on larger, realistic applications and benchmarks shown below the speedup is between 1% and 8%. Deoptimizations are also an important building block for further optimizations in the future. Background # Fast execution of JavaScript relies heavily on speculative optimizations . That is, JIT-compilers make assumptions when generating machine code based on feedback that was collected during earlier executions. For example, given the expression a + b , the c

Continue reading on V8 Blog

Opens in a new tab

Read Full Article
5 views

Related Articles