Lune

OOPSLA2023Top-tier venue

How Profilers Can Help Navigate Type Migration

Ben Greenman, Matthias Felleisen, Christos Dimoulas

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Transitioning from structural to nominal code with efficient gradual typing cites Corpse reviver: sound and efficient gradual typing via contract verification
  • Solver-based gradual type migration cites LambdaNet: Probabilistic Type Inference using Graph Neural Networks
  • Solver-based gradual type migration cites What is decidable about gradual types?
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on5

  1. LambdaNet: Probabilistic Type Inference using Graph Neural NetworksJiayi Wei, Maruth Goyal, Greg Durrett, Isil DilligICLR 2020 · 119 citations
  2. Corpse reviver: sound and efficient gradual typing via contract verificationCameron Moy, Phuc C. Nguyen, Sam Tobin-Hochstadt, David Van HornPOPL 2021 · 16 citations
  3. Solver-based gradual type migrationLuna Phipps-Costin, Carolyn Jane Anderson, Michael Greenberg, Arjun GuhaOOPSLA 2021 · 16 citations
  4. What is decidable about gradual types?Zeina Migeed, Jens PalsbergPOPL 2020 · 12 citations
  5. Transitioning from structural to nominal code with efficient gradual typingFabian Muehlboeck, Ross TateOOPSLA 2021 · 8 citations

Related papers

  1. Taming type annotations in gradual typingJohn Peter Campora III, Sheng ChenOOPSLA 2020 · 7 citations
  2. Deep and shallow types for gradual languagesBen GreenmanPLDI 2022 · 7 citations
  3. Type-Based Gradual Typing Performance OptimizationJohn Peter Campora III, Mohammad Wahiduzzaman Khan, Sheng ChenPOPL 2024 · 3 citations
  4. Where to Start: Studying Type Annotation Practices in PythonWuxia Jin, Dinghong Zhong, Zifan Ding, Ming Fan et al.ASE 2021 · 10 citations
  5. The evolution of type annotations in python: an empirical studyLuca Di Grazia, Michael PradelFSE 2022 · 29 citations
Dusk over the sea between two cliffs drawn in fine vertical lines