Zero-Overhead Lexical Effect Handlers
summary
Claims a zero-overhead implementation for lexically scoped exceptional effect handlers via a type-directed translation that emits static provenance metadata per call site and a runtime stack worker with a clue integer that walks return addresses to find the right handler. Compiler emits a static lookup table keyed by return addresses, preserves semantics by a formal proof, integrates into Lexa, and shows through benchmarks that performance improves for rare-or-no-effect workloads while becoming worse when effects are extremely frequent. Artifacts and reproduced results are available.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:01Dynamic handlers modularity
- 2:26Lexical handlers benefits
- 3:28Performance overhead
- 4:12Zero overhead principle
- 4:33Handler passing example
- 5:57Key observation
- 6:59Higher-order functions example
- 9:33Compilation technique
- 10:57Performance results
- 12:21Conclusion
- 12:42Q&A: Runtime cost
- 13:44Q&A: Stack walker caching
- 14:27Q&A: Handler escape prevention
related talks
18mLexical Effect Handlers, Directly
22mLexical Effect Handler: Fast by Design, Correct by Proof
15mEffect Handlers, Evidently
21mLift Inference for Lexical Effect Handlers with Second-Class Functions
21mLift Inference for Lexical Effect Handlers with Second-Class Functions
12mCompiling Effect Handlers in Capability-Passing Style
15mEfficient Compilation of Algebraic Effect Handlers
28mFirst-class Names for Effect Handlers
