Repository navigation
Keep the render reserve at the highest edge rates - #83
Merged
Merged
Conversation
This was referenced Oct 22, 2026
Three tri/saw combinations at the 20 kHz clamp with deep oscillator 3 feedback needed 76,966 cycles a block, 154% of the one-instance budget. Every modulated edge missed the cached reciprocal and recomputed it with two hardware divisions and a 16-step shift-and-subtract loop. Compute each edge's fraction directly with one quotient digit of Knuth's algorithm D, and drop the reciprocal cache, which now costs more than it saves. Skip the step taps at a triangle's corner and the edges of a silent line voice, where they add nothing. Unroll the EMAC taps and move the next pair's load ahead of the first accumulator read, which removes a stall. The worst case is now 47,706 cycles, 95% of the budget. The output is bit-identical: the assembly matches C, and the C matches main over 6,000 random banks in both Analog settings. #74 Co-Authored-By: Claude Opus 5.5 <[email protected]>
simonjohansson
force-pushed
the
reserve-edge-rates
branch
from
October 22, 2026 21:08
1374101 to
b8da739
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the cost part of #74. The device check stays open there.
Summary
ff1, onedivu.l, at most two corrections), and drop the reciprocal cache. Under FM, every edge missed that cache.movclr, which removes a 4-cycle stall.Output is unchanged, so no tolerances or alias limits are affected.
Cost (
mise run cost, worst cycles a block, one-instance budget 50,030)All 13 scenarios got cheaper.
Verification
mise run cost: worst case is 95% of the one-instance budget, inside the 10% reservemise run cost:equivalence: assembly matches C in every sample and state; the mutation is detectedmise run test,mise run test:oscillators,mise run test:modulationpassmain: bit-identical output and state over 6,000 random banks (16.9M samples, both Analog settings, 20 kHz and 12.5 kHz edge cases, silent voices);fractionmatches 64-bit division over 200M random inputsmise run build:digitaktbuilds and lints; no 64-bit orclzhelpers are imported🤖 Generated with Claude Code