Skip to main content

Which of My Transient Type Checks Are Not (Almost) Free?

Gariano, Isaac Oscar, Roberts, Richard, Marr, Stefan, Homer, Michael, Noble, James (2019) Which of My Transient Type Checks Are Not (Almost) Free? In: VMIL 2019 Proceedings of the 11th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages. . pp. 58-66. ACM ISBN 978-1-4503-6987-9. (doi:10.1145/3358504.3361232)

PDF - Author's Accepted Manuscript
Download (928kB) Preview
[img]
Preview
Official URL
https://doi.org/10.1145/3358504.3361232

Abstract

One form of type checking used in gradually typed language is transient type checking: whenever an object ‘flows’ through code with a type annotation, the object is dynamically checked to ensure it has the methods required by the annotation. Just-in-time compilation and optimisation in virtual machines can eliminate much of the overhead of run-time transient type checks. Unfortunately this optimisation is not uniform: some type checks will significantly decrease, or even increase, a program’s performance. In this paper, we refine the so called “Takikawa” protocol, and use it to identify which type annotations have the greatest effects on performance. In particular, we show how graphing the performance of such benchmarks when varying which type annotations are present in the source code can be used to discern potential patterns in performance. We demonstrate our approach by testing the Moth virtual machine: for many of the benchmarks where Moth’s transient type checking impacts performance, we have been able to identify one or two specific type annotations that are the likely cause. Without these type annotations, the performance impact of transient type checking becomes negligible. Using our technique programmers can optimise programs by removing expensive type checks, and VM engineers can identify new opportunities for compiler optimisation.

Item Type: Conference or workshop item (Paper)
DOI/Identification number: 10.1145/3358504.3361232
Divisions: Faculties > Sciences > School of Computing
Depositing User: Stefan Marr
Date Deposited: 16 Oct 2019 10:09 UTC
Last Modified: 21 Oct 2019 10:35 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/77492 (The current URI for this page, for reference purposes)
Roberts, Richard: https://orcid.org/0000-0002-3462-8539
Marr, Stefan: https://orcid.org/0000-0001-9059-5180
Homer, Michael: https://orcid.org/0000-0003-0280-6748
Noble, James: https://orcid.org/0000-0001-9036-5692
  • Depositors only (login required):

Downloads

Downloads per month over past year