Whose Baseline (compiler) is it anyway?

05/22/2023
by   Ben L. Titzer, et al.
0

Compilers face a intrinsic tradeoff between compilation speed and code quality. The tradeoff is particularly stark in a dynamic setting where JIT compilation time contributes to application runtime. Many systems now employ multiple compilation tiers, where one tier offers fast compile speed while another has much slower compile speed but produces higher quality code. With proper heuristics on when to use each, the overall performance is better than using either compiler in isolation. At the introduction of WebAssembly into the Web platform in 2017, most engines employed optimizing compilers and pre-compiled entire modules before execution. Yet since that time, all Web engines have introduced new "baseline" compiler tiers for Wasm to improve startup time. Further, many new non-web engines have appeared, some of which also employ simple compilers. In this paper, we demystify single-pass compilers for Wasm, explaining their internal algorithms and tradeoffs, as well as providing a detailed empirical study of those employed in production. We show the design of a new single-pass compiler for a research Wasm engine that integrates with an in-place interpreter and host garbage collector using value tags. In experiments, we measure the effectiveness of optimizations targeting the cost of value tags, the relative compile speed and execution time of six baseline compilers, and place these baseline compilers in the tradeoff space with other execution tiers for Wasm.

READ FULL TEXT

page 3

page 5

page 7

research
05/02/2022

A fast in-place interpreter for WebAssembly

WebAssembly (Wasm) is a compact, well-specified bytecode format that off...
research
10/26/2020

Automatic Selection of Machine Learning Models for WCET-aware Compiler Heuristic Generation

Machine learning has shown its capabilities for an automatic generation ...
research
10/26/2020

Automatic WCET Reduction by Machine Learning Based Heuristics for Function Inlining

The application of machine learning techniques in compiler frame- works ...
research
02/08/2018

Putting in All the Stops: Execution Control for JavaScript

Scores of compilers produce JavaScript, enabling programmers to use many...
research
06/27/2017

A Robust Data Hiding Process Contributing to the Development of a Semantic Web

In this paper, a novel steganographic scheme based on chaotic iterations...
research
09/06/2018

Future Directions for Optimizing Compilers

As software becomes larger, programming languages become higher-level, a...

Please sign up or login with your details

Forgot password? Click here to reset