libretro / libretro/RetroArch

[Question / Feature Request] Parallel RunAhead

Open
#10,744 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

I was wondering, how hard would it be to distribute runahead workload over multiple CPU cores? I know there's a setting to run two instances of the core in runahead, which now seems to be the default but I think it is still effectively single-threaded.

For N frames of runahead, would it be possible to have N+1 instances of cores running in parallel? One would run at 2x speed, the next one at 3x, and so on, to make N frames into the future available at the actual next frame?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating RetroArch's runahead implementation and reviewing how its existing two-instance mode schedules core execution. Determine whether N+1 parallel core instances can produce the requested future frames safely, then define completion as a working multi-core runahead mode with verified frame ordering and performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.