Skip to content

docs: PERF-NEXT design note (second core; timing model less often) - #102

Merged
tmcleroy merged 1 commit into
mainfrom
perf-next
Nov 28, 2026
Merged

tmcleroy merged 1 commit into
mainfrom
perf-next

Conversation

@tmcleroy

Copy link
Copy Markdown
Owner

A design note for #18, with no implementation: docs/plans/PERF-NEXT.md.

Recommendation: build the timing model's whole-block summary first. Start with a half-day counting build that checks how many events it could serve. Then build a prototype and time it on the Deck, under the 5% stop rule. Leave the second core alone for now.

The headline numbers:

  • The timing model is about 75% of a Deck or Machine frame (deck-perf, ddpsdoj headless) and 64% on the Air (timing off: 4.03 s to 1.47 s for 1,800 boss frames).
  • Rendering is already mostly off the emulation's thread. The pixels are on the GPU, and Metal's driver runs on its own threads. Only the draw lists' encoding (2.6% of the main thread's work) and the present (0.6%) are left on it. Measured on the Air with the windowed game program, ddpsdoj's boss, real time.
  • Second core:
    • sound: 0.5% at most;
    • the render thread: 2.6% on the Air, 3-6% on the Deck (a guess);
    • the timing model pipelined onto another core: -25% at best, -5 to -15% realistic (a guess), or a loss. It would take 2-3 weeks and puts online play's determinism at risk.
    • The 68000 and PGM sound CPUs are in lockstep with feedback at every step, and those boards are cheap anyway.
  • Block summary: -45% at most; realistic -10 to -20% on the Deck and the Machine (guesses: the share of events served, and the saving on each). 5-7 days. No translated code changes, unlike Options A and B.
  • Real time: a saving only shows on frames over 16.7 ms. That means akatana on the Deck (12.6 ms headless) and the Machine's run-ahead 2 put-back (15.4-16.2 ms). It never shows on the Air.

The note names what would settle each guess. A Deck profile of the game program in real time would sharpen the render and real-time figures. The rest can be counted headless on any machine.

🤖 Generated with Claude Code

https://claude.ai/code/session_0194hRTGVSqBjL9omj5cxJUo

A design note, no implementation: what could run beside the SH-3 (the draw
lists' encoding, the YMZ770, the blitter's decode, the timing model itself,
the 68000/PGM sound CPUs) and what each needs to stay exact; and a whole-block
summary of the timing model, against Options A and B. Effort and payoff for
each, bounded by the deck-perf profiles and a fresh Air profile of the
windowed game program. Recommends the block summary first, behind a counting
build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194hRTGVSqBjL9omj5cxJUo
@tmcleroy
tmcleroy merged commit 469562b into main Nov 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant