Efficient Selection of Type Annotations for Performance Improvement in Gradual Typing
Senxi Li (University of Tokyo, Japan), Feng Dai (University of Tokyo, Japan), Tetsuro Yamazaki (University of Tokyo, Japan), Shigeru Chiba (University of Tokyo, Japan)

TL;DR
This paper introduces a lightweight, data flow-based method for selecting type annotations in gradually typed Python programs, significantly improving execution performance while maintaining short compilation times.
Contribution
It proposes a novel, efficient technique for selecting type annotations via type inference that reduces compilation overhead and mitigates runtime performance issues in gradual typing.
Findings
Outperforms naive all-annotation strategies in execution speed.
Maintains stable compilation times compared to existing approaches.
Effective in practical Reticulated Python implementations.
Abstract
Gradual typing has gained popularity as a design choice for integrating static and dynamic typing within a single language. Several practical languages have adopted gradual typing to offer programmers the flexibility to annotate their programs as needed. Meanwhile there is a key challenge of unexpected performance degradation in partially typed programs. The execution speed may significantly decrease when simply adding more type annotations. Prior studies have investigated strategies of selectively adding type annotations for better performance. However, they are restricted in substantial compilation time, which impedes the practical usage. This paper presents a new technique to select a subset of type annotations derived by type inference for improving the execution performance of gradually typed programs. The advantage of the proposal is shorter compilation time by employing a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Logic, programming, and type systems · Software Testing and Debugging Techniques
