Libfork: Portable Continuation-Stealing With Stackless Coroutines

Fully-strict fork-join parallelism is a powerful model for shared-memory programming due to its optimal time-scaling and strong bounds on memory scaling. The latter is rarely achieved due to the difficulty of implementing continuation-stealing in traditional High Performance Computing (HPC) languages – where it is often impossible without modifying the compiler or resorting to non-portable techniques. We demonstrate how stackless-coroutines (a new feature in C++$\bm {20}$20) can enable fully-portable continuation stealing and present libfork a wait-free fine-grained parallelism library, combining coroutines with user-space, geometric segmented-stacks. We show our approach is able to achieve optimal time/memory scaling, both theoretically and empirically, across a variety of benchmarks. Compared to openMP (libomp), libfork is on average $7.2\times$7.2× faster and consumes $10\times$10× less memory. Similarly, compared to Intel's TBB, libfork is on average $2.7\times$2.7× faster and consumes $6.2\times$6.2× less memory. Additionally, we introduce non-uniform memory access (NUMA) optimizations for schedulers that demonstrate performance matching busy-waiting schedulers.

Authors

Publication Details

Journal
Apollo (University of Cambridge)
Published
2025-05-01
DOI
https://doi.org/10.17863/cam.124944
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Libfork: Portable Continuation-Stealing With Stackless Coroutines

James Elliott, Conor J Williams
Apollo (University of Cambridge)
Parallel Computing and Optimization Techniques
article

Libfork: Portable Continuation-Stealing With Stackless Coroutines

James Elliott, Conor J Williams
article en

Abstract

Fully-strict fork-join parallelism is a powerful model for shared-memory programming due to its optimal time-scaling and strong bounds on memory scaling. The latter is rarely achieved due to the difficulty of implementing continuation-stealing in traditional High Performance Computing (HPC) languages – where it is often impossible without modifying the compiler or resorting to non-portable techniques. We demonstrate how stackless-coroutines (a new feature in C++$\bm {20}$20) can enable fully-portable continuation stealing and present libfork a wait-free fine-grained parallelism library, combining coroutines with user-space, geometric segmented-stacks. We show our approach is able to achieve optimal time/memory scaling, both theoretically and empirically, across a variety of benchmarks. Compared to openMP (libomp), libfork is on average $7.2\times$7.2× faster and consumes $10\times$10× less memory. Similarly, compared to Intel's TBB, libfork is on average $2.7\times$2.7× faster and consumes $6.2\times$6.2× less memory. Additionally, we introduce non-uniform memory access (NUMA) optimizations for schedulers that demonstrate performance matching busy-waiting schedulers.

Apollo (University of Cambridge)
Openalex Percentile: Top 26%
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Libfork: Portable Continuation-Stealing With Stackless Coroutines — James Elliott, Conor J Williams · Apollo (University of Cambridge) (2025) | TGRS Research Map | TGRS