mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-30 13:08:07 -06:00
pvq_search scored every coefficient in a serial compare-and-select chain per pulse. Score all coefficients branch-free in 8-lane chunks instead (square over energy, one division), take the maximum, and run the original exact cross-multiplied test only on the entries within 1e-5 of it, which is normally a single entry whose index comes from a lane-wise count. The chosen pulse, and with it the bitstream, is unchanged; a test compares the result with the old scalar search on 6000 random, sparse, tied and extreme-scale vectors. The pre-projection also uses the truncating cast instead of a floor libm call (the value is non-negative). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>