跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 程序设计语言

arXiv:2603.05649 (cs)
[提交于 2026年3月5日]

标题:Efficient Selection of Type Annotations for Performance Improvement in Gradual Typing

作者:Senxi Li, Feng Dai, Tetsuro Yamazaki, Shigeru Chiba
查看论文《Efficient Selection of Type Annotations for Performance Improvement in Gradual Typing》的 PDF
查看中文 PDF 查看原文 PDF EasyResearch 阅读
摘要: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 lightweight, amortized approach. It selects type annotations along the data flows, which is expected to avoid expensive runtime casts caused by a value repeatedly crossing the boundaries between untyped and typed code. We demonstrate the applicability of our proposal, and conduct experiments to validate its effectiveness of improving the execution time on Reticulated Python. Our implementation supports a Python subset to select type annotations derived by an implemented, external type inference engine. Experiment results show that our proposal outperforms a naive strategy of using all type annotations derived by type inference among the benchmark programs. In comparison with an existing approach, the proposal achieves comparable execution speed and shows advantage of maintaining a more stable compilation time of deriving and selecting type annotations. Our results empirically indicate that the proposed technique is practical within Reticulated Python for mitigating the performance bottleneck of gradually typed programs.
主题: 程序设计语言 (cs.PL)
引用方式: arXiv:2603.05649 [cs.PL]
  (或者 arXiv:2603.05649v1 [cs.PL] 对于此版本)
  https://doi.org/10.48550/arXiv.2603.05649
期刊参考: The Art, Science, and Engineering of Programming, 2026, Vol. 11, Issue 1, Article 3
相关 DOI: https://doi.org/10.22152/programming-journal.org/2026/11/3

提交历史

来自:Senxi Li
[v1] 2026年3月5日 星期四 19:58:35 UTC
全文链接:

访问论文:

  • 查看中文 PDF
  • 查看原文 PDF
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.PL
< 上一篇   |   下一篇 >
最新 | 近期 | 2026-03
切换浏览方式为:
cs

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站