Skip to main content
Kent Academic Repository

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)

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: 05 Nov 2024 12:55 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/89178 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views for this document in KAR since July 2020. For more details click on the image.