Skip to content

Reuse XMA inverse-transform rotations - #113

Closed
andrewDoing wants to merge 1 commit into
DexNom:mainfrom
andrewDoing:perf/cache-xma-mdct-rotations
Closed

andrewDoing wants to merge 1 commit into
DexNom:mainfrom
andrewDoing:perf/cache-xma-mdct-rotations

Conversation

@andrewDoing

@andrewDoing andrewDoing commented Nov 26, 2026 •

Copy link
Copy Markdown

XMA's inverse transform recalculates the same rotations for each channel and subframe. Cache the rotations for the three supported transform sizes and reuse them.

The prototype matched baseline output bits for 3,000 synthetic transforms across 128, 256, and 512 samples and three scales. Seven-run medians for 5,000 transforms were 9.576 → 3.982 ms, 19.793 → 8.147 ms, and 39.994 → 18.102 ms respectively. Five runnable XMA tests passed, including independent cosine-sum and overlap reconstruction checks.

Pinned Rust 1.98.1: both workspace Clippy configurations and asset policy passed; serial workspace tests: 683 passed, 0 failed, 12 ignored with CI's software-adapter setting. External real-stream/reference fixtures were unavailable and their two tests remain ignored; no gameplay or audible comparison was performed.

GPT-6.2 Astra implemented and tested the change.

Related work: TG0000's XMA rotation tables independently covers rotations and also tables FFT butterflies and bit reversal. This change was implemented independently and limits itself to rotations.

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.

2 participants