Efficient Parallel Functional Programming with Effects
Jatin Arora, Sam Westrick, Umut A. Acar
Abstract
Although functional programming languages simplify writing safe parallel programs by helping programmers to avoid data races, they have traditionally delivered poor performance. Recent work improved performance by using a hierarchical memory architecture that allows processors to allocate and reclaim memory independently without any synchronization, solving thus the key performance challenge afflicting functional programs. The approach, however, restricts mutation, or memory effects, so as to ensure "disentanglement", a low-level memory property that guarantees independence between different heaps in the hierarchy.
This paper proposes techniques for supporting entanglement and for allowing functional programs to use mutation at will. Our techniques manage entanglement by distinguishing between disentangled and entangled objects and shielding disentangled objects from the cost of entanglement management. We present a semantics that formalizes entanglement as a property at the granularity of memory objects, and define several cost metrics to reason about and bound the time and space cost of entanglement. We present an implementation of the techniques by extending the MPL compiler for Parallel ML. The extended compiler supports all features of the Parallel ML language, including unrestricted effects. Our experiments using a variety of benchmarks show that MPL incurs a small time and space overhead compared to sequential runs, scales well, and is competitive with languages such as C++, Go, Java, OCaml. These results show that our techniques can marry the safety benefits of functional programming with performance.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b034f1db-f305-4d78-a393-b635f3a1ef4aCited by top-tier papers5
- Automatic Parallelism ManagementSam Westrick, Matthew Fluet, Mike Rainey, Umut A. AcarPOPL 2024 · 7 citations
- TypeDis: A Type System for DisentanglementAlexandre Moine, Stephanie Balzer, Alex Xu, Sam WestrickPOPL 2026 · 1 citation
- Iso: Request-Private Garbage CollectionTianle Qiu, Stephen M. BlackburnPLDI 2025 · 1 citation
- Disentanglement with Futures, State, and InteractionJatin Arora, Stefan K. Muller, Umut A. AcarPOPL 2024
- DisLog: A Separation Logic for DisentanglementAlexandre Moine, Sam Westrick, Stephanie BalzerPOPL 2024
Builds on4
- Disentanglement in nested-parallel programsSam Westrick, Rohan Yadav, Matthew Fluet, Umut A. AcarPOPL 2020 · 19 citations
- Responsive parallelism with futures and stateStefan K. Muller, Kyle Singer, Noah Goldstein, Umut A. Acar et al.PLDI 2020 · 12 citations
- Proving highly-concurrent traversals correctYotam M. Y. Feldman, Artem Khyzha, Constantin Enea, Adam Morrison et al.OOPSLA 2020 · 12 citations
- Provably space-efficient parallel functional programmingJatin Arora, Sam Westrick, Umut A. AcarPOPL 2021 · 9 citations
Related papers
- Pure Borrow: Linear Haskell Meets Rust-Style BorrowingYusuke Matsushita, Hiromi IshiiPLDI 2026
- Explicit Effects and Effect Constraints in ReMLMartin ElsmanPOPL 2024 · 4 citations
- Parallelism in a Region Inference ContextMartin Elsman, Troels HenriksenPLDI 2023 · 2 citations
- Descend: A Safe GPU Systems Programming LanguageBastian Köpcke, Sergei Gorlatch, Michel SteuwerPLDI 2024 · 7 citations
- Reachability types: tracking aliasing and separation in higher-order functional programsYuyan Bao, Guannan Wei, Oliver Bracevac, Yuxuan Jiang et al.OOPSLA 2021 · 19 citations
