Repository navigation
Performance Research A09 Prepared Voice Controls
| Field | Value |
|---|---|
| Evidence state | Source-backed duplicate derivation; complete invalidation not established |
| Inspected source | 322986f4c5502b3fa887a9605ac8cd88e9b2c579 |
| First experiment | Per-invocation typed controls and input-keyed derivations |
| Scope | Addendum dated September 15, 2026; not a current-main benchmark or implementation status |
Unproven performance research · Performance research — common test protocol · Performance research — reproducible checks
Avoid a misleading premise. The sample-fetch function already reads several controls before its sample loop. The opportunity is not to “hoist every per-sample parameter,” because much is already hoisted. More promising duplication exists across scheduling, voice_process(), and resampler/fetch invocations, plus expensive derived values such as pitch and filter parameters. Voice processing and accessors.
First implementation. Decode a small typed control structure once per defensible processing interval. Retain mutable cursors, envelope transitions, active flags, and notifications in the stateful path. Cache pure derivations by their actual input values before attempting a long-lived cache of guest memory.
Cross-frame trap. voice_get_mask() reads guest physical RAM. Invalidating only on known VP MMIO methods will miss writes that reach that memory by another route. A generation counter is useful only if every relevant writer advances it. Broadening the APU lock does not solve that automatically.
Gain and proof. Count eliminated physical reads and repeated pure derivations. A frame-local cache is lower-risk but may have smaller gain; a cross-frame cache needs a complete invalidation proof. Compare outputs and all control transitions against an always-read path, with deliberate direct RAM updates as a negative control.
Preferred small first patch. A11's finite-domain attenuation table avoids this invalidation problem altogether.
Do not start with cross-frame RAM caching. Keep cursors, active flags, envelope transitions and notifiers in the existing stateful path.
RAM-backed controls -> per-invocation decode -> input-keyed pure derivation; mutable state remains live
Locate the inspected seam before editing; names or ownership may have changed since the pinned review:
git grep -n -E 'voice_get_mask|voice_get_samples|voice_process|get_voice_bin_src_dst|attenuate' -- hw/xbox/mcpx/apu/vpThese are implementation gates to add or exercise, not claims that production tests already exist or passed. Retained standalone checks are on the checks page.
| Test ID | Setup / deliberate control | Required oracle |
|---|---|---|
A09.01 |
Repeat an invocation with identical controls, then vary each derived-value input independently. | Unchanged inputs reuse equivalent values; every changed input reaches the correct derivation. |
A09.02 |
Mutate relevant controls by direct guest RAM writes rather than only known VP methods. | The next eligible observation sees the change; an MMIO-only invalidation scheme fails this control. |
A09.03 |
Advance envelope/cursor/active state during normal voice transitions. | Prepared controls do not freeze mutable state or suppress required reads/writes. |
Collect: control_reads, decoded_fields, derived_value_calls, cache_hits, invalidations, control_prepare_cpu_ns, frame_cpu_ns. Keep exact counts separate from sampled durations; use an uninstrumented build for performance qualification.
Reject or hold: Reject a stale control. Report reductions against current code, not a claim that all current reads occur inside the sample loop.
Follow the common protocol for source identities, previous-main/fixed-baseline controls, raw results, confidence and retail/XISO qualification. No gain becomes proven from a model, cache hit, local operation count, or shifted wait label alone.
DSP tooling guide and navigation updated November 2, 2026 for experimental PR #384, source 8f51d237. Capture/replay usage and limits.
The earlier wiki-wide review was published November 1, 2026. Emulator source: b7140848. Reviewed wiki content: 1d2b671. Current status · Release availability · Publication process.
- Home
- Current status
- Stable versus main
- Implemented mechanisms
- Controls and defaults
- Measured results and limits
- Complete change register
- System
- CPU and vCPU
- Memory and DMA
- Graphics / NV2A
- APU and audio
- Timing and timers
- Platform and I/O
- Hardware observations
- Fidelity boundaries
- Methodology
- PGR2 routes
- Debugging lag / hot paths
- Tools and commands
- DSP capture, replay and fuzzing
- HLE readiness and public XISO proof
- Concurrent DSP shadow and OpenAL proof
- DSP HLE operation inventory
- DSP HLE fix examples and testing
- Development
- Upstream shortlist
- Wiki maintenance
- Research / retired work
- Optimization catalog
- Hot-path shortcuts
- Researched experiments
- Unproven proposal directory
- PR lessons
- September26 snapshot
Repository · PRs · Issues