Skip to content

Add checked native Stack recipes and an audio-block benchmark - #72

Draft
izaak wants to merge 3 commits into
audulus:refactor/checked-side-tablesfrom
izaak:demo/checked-stack-compact
Draft

Add checked native Stack recipes and an audio-block benchmark#72
izaak wants to merge 3 commits into
audulus:refactor/checked-side-tablesfrom
izaak:demo/checked-stack-compact

Conversation

@izaak

@izaak izaak commented Sep 10, 2026

Copy link
Copy Markdown

This adds an opt-in native Stack path for eligible checked loops, plus a benchmark of complete audio-block calls. Work in progress: shared for early feedback on the architecture and benchmark; the design is still being developed.

Builds on #71, which builds on #70. The base is refactor/checked-side-tables, so this PR contains only the following three commits. Once #71 is merged, this work can be rebased and retargeted to main.

  1. f84857a — Native Stack architecture and cleanup. Recognize checked pointwise maps and one-pole/biquad recurrences, generate precompiled arithmetic from shared recipes, and retain ordinary bytecode behind a guarded execution boundary with state publication and cancellation fallback.
  2. 3537caf — Pointwise recipe extensions. Add gain, offset, square, and smootherstep using the existing recipe and test infrastructure.
  3. 03695a2 — Complete audio-block benchmark. Compare ordinary optimized Stack and native loops across all ten recipes in f32 and f64, measuring complete 240-sample calls with host staging, persistent recurrence state, output consumption, and a cancellation callback. Report paired timing medians and spread, with compilation and backend creation measured separately.

Recognize eligible concrete checked loops through immutable values and ordered
effects, and generate precompiled arithmetic from the same recipes. Add an
opt-in Stack compiler path for pointwise maps, one-pole and biquad loops.

Retain ordinary bytecode behind a shared guarded execution boundary, including
state publication and cancellation fallback. Consolidate bridge case tables,
retain only consumed analysis metadata, and format all pointwise recipes alike.
Add gain, offset, square and smootherstep using recipe definitions and existing
test infrastructure. These demonstrate zero and one coefficient ports plus
reused intermediate values without additional interpreter machinery.
Compare ordinary optimized Stack and native loops across all ten recipes in
f32 and f64. Measure complete 240-sample calls with host staging, persistent
recurrence state, output consumption and a cancellation callback installed.

Report paired timing medians and spread, with compilation and backend creation
separately. Keep gain, biquad and smootherstep first in the output. Reuse the
same host setup and output/state comparisons without additional dependencies.
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.

1 participant