paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Navigating Mixed-Typed Migration with Profilers

用性能分析器导航混合类型迁移
TOPLAS 48(1)2026匹配度 2/10 · 论文研究 Typed Racket 混合类型迁移中的性能退化与性能分析器指导策略,属于编程语言与开发者工具方向,但未涉及用户核心关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析。引用 1 inbox
Nathaniel Hejduk, Ben Greenman, Matthias Felleisen, Christos Dimoulas
crossref: 2026-09-10

AI 速览

一句话:评估现成性能分析器能否指导 Typed Racket 的逐组件混合类型迁移,并给出最有效的边界分析器驱动迁移策略。

程序从无类型到有类型的逐组件迁移可能引发意外性能退化:选对组件可降低类型强制成本,选错则加重。本文研究现成的 profiling 工具能否为 Typed Racket 中的迁移选择提供有效指导。作者采用理性程序员方法,在数万个性能调试场景上比较两种 profiler 与 23 种将 profiler 输出转化为迁移选择的策略。最有效策略依赖 boundary profiler 找代价最高的组件间边界,并在其两侧添加深度强制类型;当 profiler 未能识别边界时,策略随机迁移一步以避免停滞。结果表明,在至多容忍两次性能退化的前提下,该策略能在超过一半场景中完全消除运行时类型检查成本。

问题
混合类型迁移中,逐组件从无类型添加类型可能造成意外性能退化,而现有 profiling 信息是否足以指导迁移选择尚不清楚。
方法
采用理性程序员方法,构造数万个性能调试场景,比较两种 profiler 和 23 种从 profiler 输出生成迁移决策的策略。
评估
在 Typed Racket 上评估运行时类型检查成本与可容忍性能退化次数;最有效的 boundary profiler 策略在至多两次退化时可在过半场景消除类型检查成本。
原文摘要(Abstract)

The component-by-component migration of a program from untyped to typed can trigger unintended performance degradations. When such a degradation occurs, typing well-chosen components can lessen the cost of type enforcement, while typing poorly chosen components can exacerbate it. This article examines whether off-the-shelf profiling tools deliver information that is an effective guide for navigating these migration choices in Typed Racket. Using the rational-programmer method, the article tests this hypothesis with an experiment that involves tens of thousands of performance-debugging scenarios, two different profiler types, and 23 strategies that convert profiler output to migration choices. The most effective strategy relies on a boundary profiler to identify the costliest inter-component boundary and then adds deeply enforced types to both sides. When the output of this profiler fails to identify a boundary, the strategy takes a random migration step—similar to the way many computational approaches resort temporarily to random choices to avoid getting stuck. The strategy completely eliminates the cost of run-time type checks in more than half of the scenarios if at most two performance degradations are tolerable along the way.

链接与引用

DOI 原文 · DBLP

BibTeX
@article{HejdukGFD26,
  title = {Navigating Mixed-Typed Migration with Profilers},
  author = {Nathaniel Hejduk and Ben Greenman and Matthias Felleisen and Christos Dimoulas},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {48},
  number = {1},
  year = {2026},
  doi = {10.1145/3785004}
}