TASEmulators / TASEmulators/BizHawk

[F.Rq.] Alternate implementation(s) for `NullEmulator.FrameAdvance`

Open
#4,128 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

App: EmuHawk Request: Feature/Enhancement
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

Currently, it sleeps for 5 ms:
https://github.com/TASEmulators/BizHawk/blob/a39689d62d99ea7bb6d905587b35088f0fa65384/src/BizHawk.Emulation.Common/Base%20Implementations/NullEmulator.cs#L34-L40
I'm thinking it could be helpful for S–N ratio in profiling if it did something else, namely return instantly. Other options are Thread.Sleep(0) or a busy loop.

Unrelated to #1942 though I still want that.

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 with src/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs at NullEmulator.FrameAdvance, which currently sleeps for 5 ms. Compare the proposed instant return, Thread.Sleep(0), and busy-loop behaviors for profiling signal-to-noise, then confirm which behavior should be adopted. Done means an agreed implementation choice is documented and the method reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
performance
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.