bevyengine / bevyengine/bevy

Work-stealing fork-join parallelism

Open
#23,042 0 comments 2 reactions 0 assignees View on GitHub
A-ECS A-Tasks C-Goal C-Performance S-Needs-Design-Doc S-Waiting-on-SME X-Needs-SME
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Goal Description

Work-stealing fork-join parallelism is one of the classic building blocks of parallel operations. It's fundamentally how things like Rayon, OpenMP, and IntelTBB work on the lowest level; and it's the standard approach to (for example) parallel tree traversal. Bevy does a lot of tree traversal, and we've created ad-hoc versions of this in many places to speed it up. But those implementations are complex, hard to use, hard to maintain, and generally quite unsafe. Providing an api similar to rayon's `join()` would let us clean up and centralize all of this, and would unlock much nicer apis for in-system parallelism across query results.

See related: https://github.com/bevyengine/bevy/pull/11492

## Goal Status

This is a potential [Bevy Project Goal](https://bevy.org/learn/contribute/project-information/project-goals/). Its state on the [Project Goals Board](https://github.com/orgs/bevyengine/projects/23/views/1) determines if it is Proposed, Postponed, Blocked (Approved), Inactive (Approved), Active (Approved), Completed, or Declined.

- **Staffing SMEs**: Not yet staffed
- **Working Group Link**: Working Group not yet formed
- **Design Documents**: Design documents not yet written

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.