scispace - formally typeset
Proceedings ArticleDOI

Deoptimization for dynamic language JITs on typed, stack-based virtual machines

Reads0
Chats0
TLDR
This paper proposes a novel technique that enables deoptimization for dynamic language runtimes implemented on top of typed, stack-based virtual machines, and implements this technique in a JavaScript language implementation, MCJS, running ontop of the Mono runtime (CLR).
Abstract
We are interested in implementing dynamic language runtimes on top of language-level virtual machines. Type specialization is a critical optimization for dynamic language runtimes: generic code that handles any type of data is replaced with specialized code for particular types observed during execution. However, types can change, and the runtime must recover whenever unexpected types are encountered. The state-of-the-art recovery mechanism is called deoptimization. Deoptimization is a well-known technique for dynamic language runtimes implemented in low-level languages like C. However, no dynamic language runtime implemented on top of a virtual machine such as the Common Language Runtime (CLR) or the Java Virtual Machine (JVM) uses deoptimization, because the implementation thereof used in low-level languages is not possible.In this paper we propose a novel technique that enables deoptimization for dynamic language runtimes implemented on top of typed, stack-based virtual machines. Our technique does not require any changes to the underlying virtual machine. We implement our proposed technique in a JavaScript language implementation, MCJS, running on top of the Mono runtime (CLR). We evaluate our implementation against the current state-of-the-art recovery mechanism for virtual machine-based runtimes, as implemented both in MCJS and in IronJS. We show that deoptimization provides significant performance benefits, even for runtimes running on top of a virtual machine.

read more

Content maybe subject to copyright    Report

Citations
More filters
Proceedings ArticleDOI

Just-In-Time GPU Compilation for Interpreted Languages with Partial Evaluation

TL;DR: This paper uses just-in-time compilation to transparently and automatically offload computations from interpreted dynamic languages to heterogeneous devices and shows that when taking into account start-up time, large speedups are achievable, even when the applications run for as little as a few seconds.
Proceedings ArticleDOI

Vector Parallelism in JavaScript: Language and Compiler Support for SIMD

TL;DR: The design and implementation of SIMD language extensions and compiler support that together add fine-grain vector parallelism to JavaScript are presented and significantly improve compute-intensive interactive applications in the browser by exploiting vector Parallelism without relying on automatic vectorizing compiler technology, non-portable native code, or plugins.
Proceedings ArticleDOI

Techniques and applications for guest-language safepoints

TL;DR: An API for using safepoints in languages that were implemented under the Truffle language implementation framework on the Java Virtual Machine is described and several applications of the API are shown to implement useful guest-language functionality.
Proceedings ArticleDOI

Overhead of deoptimization checks in the V8 javascript engine

TL;DR: This work analyzed the frequency of conditional deoptimization checks and the performance impact of the associated conditional branch using the V8 Javascript engine running the Octane benchmarks, finding that removing these checks provides only a 2.2% performance improvement when running on a high performance Intel CPU, but a 4.6% performance improved on an Intel CPU optimized for low power consumption.
Proceedings ArticleDOI

An Empirical Study on Deoptimization in the Graal Compiler

TL;DR: It is found that the choice of a deoptimization strategy has negligible impact on steady-state performance, which indicates that the cost of speculation matters mainly during start-up, where it can disturb the delicate balance between executing the program and the compiler, but is quickly amortized in steady state.
References
More filters
Proceedings ArticleDOI

Trace-based just-in-time type specialization for dynamic languages

TL;DR: This work presents an alternative compilation technique for dynamically-typed languages that identifies frequently executed loop traces at run-time and then generates machine code on the fly that is specialized for the actual dynamic types occurring on each path through the loop.
Proceedings ArticleDOI

Debugging optimized code with dynamic deoptimization

TL;DR: SELF's debugging system provides complete source-level debugging (expected behavior) with globally optimized code and is the first practical system providing full expected behavior with globally optimize code.

The java hotspot TM server compiler

TL;DR: The Java HotSpotTM Server Compiler achieves improved asymptotic performance through a combination of object-oriented and classical-compiler optimizations.
Proceedings ArticleDOI

Tracing the meta-level: PyPy's tracing JIT compiler

TL;DR: This paper shows how to guide tracing JIT compilers to greatly improve the speed of bytecode interpreters, and how to unroll the bytecode dispatch loop, based on two kinds of hints provided by the implementer of thebytecode interpreter.
Proceedings ArticleDOI

Design, implementation and evaluation of adaptive recompilation with on-stack replacement

TL;DR: A new, simple, mostly compiler-independent mechanism to transfer execution into compiled code, and enhancements to an analytic model for recompilation to exploit OSR for more aggressive optimization are presented.
Related Papers (5)