Answers are grounded in this paper and cite their sources.
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 paper 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 paper tests this hypothesis with an experiment that involves tens of thousands of performance-debugging scenarios, two different profiler types, and twenty-three strategies that convert profiler output to migration choices. The most effective strategy relies on a boundary profiler to identify the costliest inter-component boundary, 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.
No takes yet. Share an insight, caveat, or question.
Hejduk et al. (2025) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: