Skip to content

Speed up XMA coefficient codebook lookup - #117

Open
andrewDoing wants to merge 2 commits into
DexNom:mainfrom
andrewDoing:perf/xma-prefix-lookup
Open

andrewDoing wants to merge 2 commits into
DexNom:mainfrom
andrewDoing:perf/xma-prefix-lookup

Conversation

@andrewDoing

Copy link
Copy Markdown

XMA coefficient decoding searches whole Huffman codebooks for every symbol. Add bounded prefix indices for six books while keeping the original scale-factor search, whose performance regressed in an earlier prototype.

Regression checks cover both ends of every symbol, all codeword/prefix boundaries, and 10,000 random words per book at eight offsets, checking both decoded symbols and consumed lengths. Synthetic mono-frame decoding matched 131,072 baseline PCM samples. Seven-run full-decoder medians for 3,200 frames were 47.204 → 41.077 ms for a common mix and 46.613 → 42.813 ms for a rare-code mix. These are synthetic measurements; real-stream fixtures and gameplay audio were unavailable.

Pinned Rust 1.98.1: both workspace Clippy configurations and asset policy passed; serial workspace tests: 684 passed, 0 failed, 12 ignored with CI's software-adapter setting.

GPT-6.2 Astra implemented and tested the change.

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