Effects for Efficiency: Asymptotic Speedup with First-Class Control
Daniel Hillerstr\"om, Sam Lindley, and John Longley

TL;DR
This paper demonstrates that effect handlers in programming languages can asymptotically improve runtime efficiency for certain functions, even with mutable state, marking a novel result for control operators.
Contribution
It proves that effect handlers enable asymptotic speedups in runtime complexity for a class of functions, a first for control operators.
Findings
Effect handlers improve asymptotic runtime complexity.
Efficiency gap persists with mutable state.
First formal proof of control operators' efficiency benefits.
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 and its extension with effect handlers . We show that admits an asymptotically more efficient implementation of generic count than any implementation. We also show that this efficiency gap remains when is extended with mutable state. To our knowledge this result is the first of its kind for control operators.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Computability, Logic, AI Algorithms · semigroups and automata theory
