paperbot · PL 论文追踪

全部论文 待读 收藏

P2 How Profilers Can Help Navigate Type Migration

性能剖析器如何帮助导航类型迁移
OOPSLA 7(OOPSLA2)2023匹配度 2/10 · 论文属于程序语言与类型系统方向,研究用剖析器引导类型迁移以减少运行时检查开销,但未涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心方向。其经验性策略比较虽有一定工程价值,但与用户当前研究画像交集很小。引用 1 inbox
Ben Greenman, Matthias Felleisen, Christos Dimoulas
crossref: 2026-09-10

AI 速览

一句话:通过数万性能调试场景实验比较17种剖析器引导策略,发现用深度类型消除昂贵边界最有效。

健全的迁移类型化旨在安全顺畅地将无类型代码重构为有类型代码,但运行时检查会带来高昂成本,常常导致性能回退。由于迁移类型格的规模随组件数指数增长,开发者很难判断应为哪些组件添加类型。本文遵循理性程序员方法,将现成性能剖析器的输出转化为可执行的迁移下一步,并设计了17种策略,在数万个性能调试场景中进行实验。结果表明,最有效的策略是使用深度类型来消除类型化与无类型组件之间代价最高的边界;若允许过程中出现两次性能退化,该策略在超过50%的场景中成功。

问题
在健全的迁移类型化中,为保障安全而引入的运行时检查可能导致严重性能回退,而指数级增长的迁移类型格使开发者难以选择应标注类型的组件。
方法
遵循理性程序员方法,设计17种将性能剖析器输出转化为下一步迁移动作的策略,并在数万个性能调试场景中进行实验比较。
评估
在数万个性能调试场景上评估各策略的有效性;用深度类型消除最昂贵的类型/无类型边界的策略表现最佳,在可容忍两次性能退化时成功率超过50%。
原文摘要(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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1847,
  title = {How Profilers Can Help Navigate Type Migration},
  author = {Ben Greenman and Matthias Felleisen and Christos Dimoulas},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {OOPSLA2},
  year = {2023},
  doi = {10.1145/3622817}
}