This repository has been archived on 2026-09-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
xenia-rs/crates
MechaCat02 9851873e42 [iterate-4B] perf: quick hot-path wins (bulk quantum-decrement + ctx coalesce)
Two byte-identical interpreter-dispatch optimizations (headless golden
n200m unchanged). Together ~13% faster on the -n 200M --gpu-inline
benchmark (4.33s -> ~3.8s, ~46 -> ~53 MIPS).

- scheduler.rs: `decrement_quantum_by(n)` — the superblock epilogue looped
  `for _ in 0..executed { decrement_quantum() }` (~one bounds-checked call
  per retired guest instruction, the largest fixed per-superblock cost).
  QUANTUM_DEFAULT (50k) >> a superblock's instr count, so the quantum
  boundary is crossed at most once/call: common path is one subtraction,
  the rare boundary step defers to decrement_quantum for exact rotation
  (reload + same-priority peer hand-off) semantics. Byte-identical.
- main.rs run_superblock: resolve the running thread's PpcContext ONCE per
  block (was three `ctx_mut_ref` double-indexed slot lookups: cycle-before,
  the step, cycle-after).

Profiled remaining breakdown (-n 300M --gpu-inline): step_block body 50%
(67 MIPS, the JIT target), block decode/cache 9% (page-version-bound),
kernel HLE 8%, scheduler/lock remainder ~31%. Sub-10% cheap wins remain
(block-linking is page-version-gated so only partial); the 5-10x lift is
the JIT.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 23:03:46 +02:00
..