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<b>++</b><inline-formula><tex-math notation="LaTeX">$\bm {20}$</tex-math></inline-formula>) can enable fully-portable continuation stealing and present <i>libfork</i> 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 <inline-formula><tex-math notation="LaTeX">$7.2\times$</tex-math></inline-formula> faster and consumes <inline-formula><tex-math notation="LaTeX">$10\times$</tex-math></inline-formula> less memory. Similarly, compared to Intel's TBB, libfork is on average <inline-formula><tex-math notation="LaTeX">$2.7\times$</tex-math></inline-formula> faster and consumes <inline-formula><tex-math notation="LaTeX">$6.2\times$</tex-math></inline-formula> less memory. Additionally, we introduce non-uniform memory access (NUMA) optimizations for schedulers that demonstrate performance matching <i>busy-waiting</i> schedulers.

Authors

Institutions

Publication Details

Journal
IEEE Transactions on Parallel and Distributed Systems
Published
2025-02-18
DOI
https://doi.org/10.1109/tpds.2025.3543442
Citations
1
Primary Topic
Acoustic Wave Resonator Technologies
Type
article
Field-Weighted Citation Impact
0.67
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Libfork: Portable Continuation-Stealing With Stackless Coroutines

James A. Elliott, C. J. F. Williams
1 citations
IEEE Transactions on Parallel and Distributed Systems
Acoustic Wave Resonator Technologies
0.67
article

Libfork: Portable Continuation-Stealing With Stackless Coroutines

James A. Elliott, C. J. F. Williams
article en
1 citations

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<b>++</b><inline-formula><tex-math notation="LaTeX">$\bm {20}$</tex-math></inline-formula>) can enable fully-portable continuation stealing and present <i>libfork</i> 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 <inline-formula><tex-math notation="LaTeX">$7.2\times$</tex-math></inline-formula> faster and consumes <inline-formula><tex-math notation="LaTeX">$10\times$</tex-math></inline-formula> less memory. Similarly, compared to Intel's TBB, libfork is on average <inline-formula><tex-math notation="LaTeX">$2.7\times$</tex-math></inline-formula> faster and consumes <inline-formula><tex-math notation="LaTeX">$6.2\times$</tex-math></inline-formula> less memory. Additionally, we introduce non-uniform memory access (NUMA) optimizations for schedulers that demonstrate performance matching <i>busy-waiting</i> schedulers.

IEEE Transactions on Parallel and Distributed SystemsVol. 36(5)
University of Cambridge (GB)
Openalex Percentile: Top 35%
Acoustic Wave Resonator Technologies
0.67
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.