How Profilers Can Help Navigate Type Migration
Ben Greenman, Matthias Felleisen, Christos Dimoulas
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Transitioning from structural to nominal code with efficient gradual typing 引用了 Corpse reviver: sound and efficient gradual typing via contract verification
- Solver-based gradual type migration 引用了 LambdaNet: Probabilistic Type Inference using Graph Neural Networks
- Solver-based gradual type migration 引用了 What is decidable about gradual types?
它引用的 Paper5
- LambdaNet: Probabilistic Type Inference using Graph Neural NetworksJiayi Wei, Maruth Goyal, Greg Durrett, Isil DilligICLR 2020 · 119 次引用
- Corpse reviver: sound and efficient gradual typing via contract verificationCameron Moy, Phuc C. Nguyen, Sam Tobin-Hochstadt, David Van HornPOPL 2021 · 16 次引用
- Solver-based gradual type migrationLuna Phipps-Costin, Carolyn Jane Anderson, Michael Greenberg, Arjun GuhaOOPSLA 2021 · 16 次引用
- What is decidable about gradual types?Zeina Migeed, Jens PalsbergPOPL 2020 · 12 次引用
- Transitioning from structural to nominal code with efficient gradual typingFabian Muehlboeck, Ross TateOOPSLA 2021 · 8 次引用
相关 Paper
- Taming type annotations in gradual typingJohn Peter Campora III, Sheng ChenOOPSLA 2020 · 7 次引用
- Deep and shallow types for gradual languagesBen GreenmanPLDI 2022 · 7 次引用
- Type-Based Gradual Typing Performance OptimizationJohn Peter Campora III, Mohammad Wahiduzzaman Khan, Sheng ChenPOPL 2024 · 3 次引用
- Where to Start: Studying Type Annotation Practices in PythonWuxia Jin, Dinghong Zhong, Zifan Ding, Ming Fan 等ASE 2021 · 10 次引用
- The evolution of type annotations in python: an empirical studyLuca Di Grazia, Michael PradelFSE 2022 · 29 次引用
