Making a faster Curry with extensional types
Making a faster Curry with extensional types
复制标题
使用扩展类型制作更快的 Curry
DOI:
10.1145/3331545.3342594
复制
发表时间:
2019
期刊:
影响因子:
--
通讯作者:
Peyton Jones, Simon
中科院分区:
文献类型:
--
作者:
Downen, Paul;Sullivan, Zachary;Ariola, Zena M.;Peyton Jones, Simon
Curried functions apparently take one argument at a time, which is slow. So optimizing compilers for higher-order languages invariably have some mechanism for working around currying by passing several arguments at once, as many as the function can handle, which is known as itsarity. But such mechanisms are often ad-hoc, and do not work at all in higher-order functions. We show how extensional, call-by-name functions have the correct behavior for directly expressing the arity of curried functions. And these extensional functions can stand side-by-side with functions native to practical programming languages, which do not use call-by-name evaluation. Integrating call-by-name with other evaluation strategies in the same intermediate language expresses the arity of a function in its type and gives a principled and compositional account of multi-argument curried functions. An unexpected, but significant, bonus is that our approach is equally suitable for a call-by-value language and a call-by-need language, and it can be readily integrated into an existing compilation framework.
登录
查看更多内容
DOI:
--
发表时间:
2004
期刊:
ACM SIGPLAN International Conference on Functional Programming
影响因子:
--
作者:
S. Marlow;S. Jones
通讯作者:
S. Jones
DOI:
10.1145/1596638.1596640
发表时间:
2009
期刊:
Sigplan Notices
影响因子:
--
作者:
Maximilian Bolingbroke;S. Jones
通讯作者:
S. Jones
DOI:
--
发表时间:
2013
期刊:
影响因子:
--
作者:
Guillaume Munch
通讯作者:
Guillaume Munch
DOI:
--
发表时间:
2007
期刊:
影响因子:
--
作者:
M. Menon
通讯作者:
M. Menon
DOI:
10.1145/2535838.2535861
发表时间:
2014
期刊:
Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
影响因子:
--
作者:
Ilya Sergey;Dimitrios Vytiniotis;S. Jones
通讯作者:
S. Jones