Lune

PLDI2020顶会

From folklore to fact: comparing implementations of stacks and continuations

Kavon Farvardin, John H. Reppy

摘要

The efficient implementation of function calls and non-local control transfers is a critical part of modern language implementations and is important in the implementation of everything from recursion, higher-order functions, concurrency and coroutines, to task-based parallelism. In a compiler, these features can be supported by a variety of mechanisms, including call stacks, segmented stacks, and heap-allocated continuation closures.

An implementor of a high-level language with advanced control features might ask the question "what is the best choice for my implementation?" Unfortunately, the current literature does not provide much guidance, since previous studies suffer from various flaws in methodology and are outdated for modern hardware. In the absence of recent, well-normalized measurements and a holistic overview of their implementation specifics, the path of least resistance when choosing a strategy is to trust folklore, but the folklore is also suspect.

This paper attempts to remedy this situation by providing an "apples-to-apples" comparison of six different approaches to implementing call stacks and continuations. This comparison uses the same source language, compiler pipeline, LLVM-backend, and runtime system, with the only differences being those required by the differences in implementation strategy. We compare the implementation challenges of the different approaches, their sequential performance, and their suitability to support advanced control mechanisms, including supporting heavily threaded code. In addition to the comparison of implementation strategies, the paper's contributions also include a number of useful implementation techniques that we discovered along the way.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Lexical Effect Handlers, Directly 引用了 Retrofitting effect handlers onto OCaml
  • Lexical Effect Handlers, Directly 引用了 Continuing WebAssembly with Effect Handlers
  • Lexical Effect Handlers, Directly 引用了 From Capabilities to Regions: Enabling Efficient Compilation of Lexical Effect Handlers
  • Continuing WebAssembly with Effect Handlers 引用了 Retrofitting effect handlers onto OCaml
  • From Capabilities to Regions: Enabling Efficient Compilation of Lexical Effect Handlers 引用了 Retrofitting effect handlers onto OCaml
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper8

  1. Retrofitting effect handlers onto OCamlK. C. Sivaramakrishnan, Stephen Dolan, Leo White, Tom Kelly 等PLDI 2021 · 56 次引用
  2. Continuing WebAssembly with Effect HandlersLuna Phipps-Costin, Andreas Rossberg, Arjun Guha, Daan Leijen 等OOPSLA 2023 · 20 次引用
  3. Lexical Effect Handlers, DirectlyCong Ma, Zhaoyi Ge, Edward Lee, Yizhou ZhangOOPSLA 2024 · 7 次引用
  4. From Capabilities to Regions: Enabling Efficient Compilation of Lexical Effect HandlersMarius Müller, Philipp Schuster, Jonathan Lindegaard Starup, Klaus Ostermann 等OOPSLA 2023 · 7 次引用
  5. Explicit Effects and Effect Constraints in ReMLMartin ElsmanPOPL 2024 · 4 次引用

相关 Paper

  1. Virtualizing ContinuationsCong Ma, Jonghyun Jung, Yizhou ZhangPLDI 2026
  2. Sharded Elimination and Combining for Highly-Efficient Concurrent StacksAjay Singh, Nikos Metaxakis, Panagiota FatourouPPoPP 2026
  3. Automatic Parallelism ManagementSam Westrick, Matthew Fluet, Mike Rainey, Umut A. AcarPOPL 2024 · 7 次引用
  4. Compiler and runtime support for continuation marksMatthew Flatt, R. Kent DybvigPLDI 2020 · 9 次引用
  5. Work Packets: A New Abstraction for GC Software Engineering, Optimization, and InnovationWenyu Zhao, Stephen M. Blackburn, Kathryn S. McKinleyOOPSLA 2025 · 3 次引用
黄昏的海面,两侧是细线勾勒的悬崖