How Profilers Can Help Navigate Type Migration

Ben Greenman, Matthias Felleisen, Christos Dimoulas

Research output: Contribution to journalArticlepeer-review

Abstract

Sound migratory typing envisions a safe and smooth refactoring of untyped code bases to typed ones. However, the cost of enforcing safety with run-time checks is often prohibitively high, thus performance regressions are a likely occurrence. Additional types can often recover performance, but choosing the right components to type is difficult because of the exponential size of the migratory typing lattice. In principal though, migration could be guided by off-the-shelf profiling tools. To examine this hypothesis, this paper follows the rational programmer method and reports on the results of an experiment on tens of thousands of performance-debugging scenarios via seventeen strategies for turning profiler output into an actionable next step. The most effective strategy is the use of deep types to eliminate the most costly boundaries between typed and untyped components; this strategy succeeds in more than 50% of scenarios if two performance degradations are tolerable along the way.

Original languageEnglish (US)
Article number241
JournalProceedings of the ACM on Programming Languages
Volume7
Issue numberOOPSLA2
DOIs
StatePublished - Oct 16 2023

Keywords

  • gradual typing
  • migratory typing
  • profiling
  • rational programmer

ASJC Scopus subject areas

  • Software
  • Safety, Risk, Reliability and Quality

Fingerprint

Dive into the research topics of 'How Profilers Can Help Navigate Type Migration'. Together they form a unique fingerprint.

Cite this