一句话:证明效应处理器能为 generic count 带来渐近运行时加速,且该优势无法由可变状态弥补。
论文研究分隔控制与效应处理器的根本效率问题,而非仅关注其表达力或编程便利性。作者以一个类 PCF 的纯函数式基础语言 λ_b 和其加入效应处理器扩展的语言 λ_h 为对象,考察 generic count 问题。结果表明,λ_h 可以实现渐近复杂度更优的 generic count,而任何 λ_b 实现都无法达到该复杂度;即便给 λ_b 加入可变状态,这一渐近效率差距仍然存在。该结果据作者所知是控制操作符领域的首个同类型结论。
We study the fundamental efficiency of delimited control. Specifically, we show that effect handlers enable an asymptotic improvement in runtime complexity for a certain class of functions. We consider thegeneric countproblem using a pure PCF-like base language λband its extension with effect handlers λh.We show that λhadmits an asymptotically more efficient implementation of generic count than any λbimplementation.We also show that this efficiency gap remains when λbis extended with mutable state.To our knowledge this result is the first of its kind for control operators.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@article{abs-2007-00605,
title = {Effects for efficiency: asymptotic speedup with first-class control},
author = {Daniel Hillerström and Sam Lindley and John Longley},
journal = {Proceedings of the ACM on Programming Languages},
volume = {4},
number = {ICFP},
year = {2020},
doi = {10.1145/3408982}
}