Skip to main content

Naïve Transient Cast Insertion Isn’t (That) Bad

Greenwood-Thessman, Erin, Gariano, Isaac Oscar, Roberts, Richard, Marr, Stefan, Homer, Michael, Noble, James (2021) Naïve Transient Cast Insertion Isn’t (That) Bad. In: Proceedings of the 16th ACM International Workshop on Implementation, Compilation, Optimization of OO Languages, Programs and Systems. . pp. 1-9. ACM ISBN 978-1-4503-8544-2. (doi:10.1145/3464972.3472395) (KAR id:89178)

PDF Author's Accepted Manuscript
Language: English
Download (685kB) Preview
[thumbnail of icooolps21-greenwood-thessman-et-al-naive-transient-cast-insertion-isnt-that-bad.pdf]
Preview
This file may not be suitable for users of assistive technology.
Request an accessible format
Official URL:
https://doi.org/10.1145/3464972.3472395

Abstract

Transient gradual type systems often depend on type-based cast insertion to achieve good performance: casts are inserted whenever the static checker detects that a dynamically-typed value may flow into a statically-typed context. Transient gradually typed programs are then often executed using just-in-time compilation, and contemporary just-in-time compilers are very good at removing redundant computations.

In this paper we present work-in-progress to measure the ability of just-in-time compilers to remove redundant type checks. We investigate worst-case performance and so take a na'ive approach, annotating every subexpression to insert every plausible dynamic cast. Our results indicate that the Moth VM still manages to eliminate much of the overhead, by relying on the state-of-the-art SOMns substrate and Graal just-in-time compiler.

We hope these results will help language implementers evaluate the tradeoffs between dynamic optimisations (which can improve the performance of both statically and dynamically typed programs) and static optimisations (which improve only statically typed code).

Item Type: Conference or workshop item (Paper)
DOI/Identification number: 10.1145/3464972.3472395
Uncontrolled keywords: Evaluation Experiments Graal Grace GradualTyping MeMyPublication Optimization SOMns Truffle myown
Subjects: Q Science > QA Mathematics (inc Computing science)
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Stefan Marr
Date Deposited: 12 Jul 2021 17:00 UTC
Last Modified: 13 Jan 2022 23:12 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/89178 (The current URI for this page, for reference purposes)
Marr, Stefan: https://orcid.org/0000-0001-9059-5180
  • Depositors only (login required):

Downloads

Downloads per month over past year