English

Effects for Efficiency: Asymptotic Speedup with First-Class Control

Programming Languages 2020-07-15 v2

Abstract

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 the generic count problem using a pure PCF-like base language λb\lambda_b and its extension with effect handlers λh\lambda_h. We show that λh\lambda_h admits an asymptotically more efficient implementation of generic count than any λb\lambda_b implementation. We also show that this efficiency gap remains when λb\lambda_b is extended with mutable state. To our knowledge this result is the first of its kind for control operators.

Keywords

Cite

@article{arxiv.2007.00605,
  title  = {Effects for Efficiency: Asymptotic Speedup with First-Class Control},
  author = {Daniel Hillerström and Sam Lindley and John Longley},
  journal= {arXiv preprint arXiv:2007.00605},
  year   = {2020}
}
R2 v1 2026-06-23T16:46:33.699Z