Casts and costs: harmonizing safety and performance in gradual typing
Casts and costs: harmonizing safety and performance in gradual typing
复制标题
演员和成本:协调渐进打字的安全性和性能
DOI:
10.1145/3236793
复制
发表时间:
2018
影响因子:
--
通讯作者:
Walkingshaw, Eric
中科院分区:
文献类型:
--
作者:
Campora, John Peter;Chen, Sheng;Walkingshaw, Eric
Gradual typing allows programmers to use both static and dynamic typing in a single program. However, a well-known problem with sound gradual typing is that the interactions between static and dynamic code can cause significant performance degradation. These performance pitfalls are hard to predict and resolve, and discourage users from using gradual typing features. For example, when migrating to a more statically typed program, often adding a type annotation will trigger a slowdown that can be resolved by adding more annotations elsewhere, but since it is not clear where the additional annotations must be added, the easier solution is to simply remove the annotation. To address these problems, we develop: (1) a static cost semantics that accurately predicts the overhead of static-dynamic interactions in a gradually typed program, (2) a technique for efficiently inferring such costs for all combinations of inferrable type assignments in a program, and (3) a method for translating the results of this analysis into specific recommendations and explanations that can help programmers understand, debug, and optimize the performance of gradually typed programs. We have implemented our approach in Herder, a tool for statically analyzing the performance of different typing configurations for Reticulated Python programs. An evaluation on 15 Python programs shows that Herder can use this analysis to accurately and efficiently recommend type assignments that optimize the performance of these programs without sacrificing the safety guarantees provided by static typing.
登录
查看更多内容
DOI:
10.1145/2364527.2364535
发表时间:
2012
期刊:
Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
影响因子:
--
作者:
Sheng Chen;Martin Erwig;Eric Walkingshaw
通讯作者:
Eric Walkingshaw
DOI:
--
发表时间:
2016
期刊:
ACM SIGPLAN International Conference on Functional Programming
影响因子:
--
作者:
Ezgi Çiçek;Zoe Paraskevopoulou;D. Garg
通讯作者:
D. Garg
DOI:
--
发表时间:
2016
期刊:
ACM-SIGACT Symposium on Principles of Programming Languages
影响因子:
--
作者:
Ronald Garcia;Alison M. Clark;É. Tanter
通讯作者:
É. Tanter
DOI:
--
发表时间:
2016
期刊:
ACM-SIGACT Symposium on Principles of Programming Languages
影响因子:
--
作者:
Asumu Takikawa;Daniel Feltey;B. Greenman;Max S. New;J. Vitek;M. Felleisen
通讯作者:
M. Felleisen
影响因子:
--
作者:
G. Richards;Ellen Arteca;Alexi Turcotte
通讯作者:
Alexi Turcotte