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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext bef17cdc-f69b-40c9-8bc8-c745a03c7872Builds on5
- LambdaNet: Probabilistic Type Inference using Graph Neural NetworksJiayi Wei, Maruth Goyal, Greg Durrett, Isil DilligICLR 2020 · 119 citations
- Corpse reviver: sound and efficient gradual typing via contract verificationCameron Moy, Phuc C. Nguyen, Sam Tobin-Hochstadt, David Van HornPOPL 2021 · 16 citations
- Solver-based gradual type migrationLuna Phipps-Costin, Carolyn Jane Anderson, Michael Greenberg, Arjun GuhaOOPSLA 2021 · 16 citations
- What is decidable about gradual types?Zeina Migeed, Jens PalsbergPOPL 2020 · 12 citations
- Transitioning from structural to nominal code with efficient gradual typingFabian Muehlboeck, Ross TateOOPSLA 2021 · 8 citations
Related papers
- Taming type annotations in gradual typingJohn Peter Campora III, Sheng ChenOOPSLA 2020 · 7 citations
- Deep and shallow types for gradual languagesBen GreenmanPLDI 2022 · 7 citations
- Type-Based Gradual Typing Performance OptimizationJohn Peter Campora III, Mohammad Wahiduzzaman Khan, Sheng ChenPOPL 2024 · 3 citations
- Where to Start: Studying Type Annotation Practices in PythonWuxia Jin, Dinghong Zhong, Zifan Ding, Ming Fan et al.ASE 2021 · 10 citations
- The evolution of type annotations in python: an empirical studyLuca Di Grazia, Michael PradelFSE 2022 · 29 citations
