Skip to content

Ladder: keep a channel's state in locals for the block - #375

Merged
bdbarnett merged 1 commit into
mainfrom
perf/ladder-locals
Nov 2, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
perf/ladder-locals

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

The ladder keeps each channel's state in locals for the block, which makes it about 18% cheaper on the ESP32-P4 and changes no output.

On the ESP32-P4 DEV-KIT, at 128-frame blocks (median of 16), a 2x-oversampled ladder node goes from 226 to 185 µs a block, and a 1x node from 123 to 100 µs. Poly106 with six notes held goes from 27.7 to 25.7 ms per 1024 frames, and Poly6 from 34.8 to 32.9.

Output and state bits are identical to the old ladder: 0 of 13.9 M samples differ on desktop, and a planted one-ulp fault differs in 33,519 blocks. On the board, the render hashes of poly106, poly6, mono101, poly8 and polya6 match the old firmware.

Output and state bits are identical to the old ladder (0 of 13.9 M samples
differ on desktop). On the ESP32-P4 DEV-KIT (128-frame blocks, median of 16):
a 2x-oversampled ladder node 226 to 185 us a block (-18%), a 1x node 123 to
100 us, and Poly106 with six notes held 27.7 to 25.7 ms per 1024 frames. The
five instruments' render hashes on the board match the old firmware.
@bdbarnett
bdbarnett merged commit 331742e into main Nov 2, 2026
34 checks passed
@bdbarnett
bdbarnett deleted the perf/ladder-locals branch November 2, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant