Skip to content

perf(gust): synth 0.38.0 SYNTH_SHIFT_MASK_ELIDE — gust_mix 1.69×→1.50× (the lever gale filed shipped) - #159

Merged
avrabe merged 1 commit into
mainfrom
perf/synth-0380-mask-elide
Jul 10, 2026
Merged

avrabe merged 1 commit into
mainfrom
perf/synth-0380-mask-elide

Conversation

@avrabe

@avrabe avrabe commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What

synth 0.38.0 ships the mask-elision lever gale filed (synth#686 → #692, SYNTH_SHIFT_MASK_ELIDE, flag-off) — eliding #682's mod-32 AND rm,#31 shift mask where the amount is provably <32, exactly gale's gust_mix (Q8 constant shifts). Re-pin cm3+cm4 with the flag.

Measured (gust_codegen_bench, qemu -icount)

fn-only ticks/call .text (gust_mix) ratio vs native LLVM
0.37.1 pin (before, #157) 0.675 82 B 1.69×
0.38.0 mask-elide (after) 0.600 68 B 1.50×

−11% cycles, −17% .text. Best measured dissolved-vs-native on the shipped path — the ladder is now 2.81× → 2.63× → 1.81× → 1.69× → 1.50× (floor target 0.45×).

Correctness gates (all pass)

  • gust_floor_bench soundness mix_proven ≡ mix_native ≡ gust_mix over [524,1524] — sound.
  • Proof-carrying floor still 0.45×; in-range dissolved 1.55× → 1.40×.
  • silicon_bench links cleanly for thumbv7em-none-eabi.
  • 0.38.0 default (flag-off) is perf-neutral (1.69×, .text 82) — verified; the win needs the flag.

Note on .o size

The relocatable .o grew 432 → 496 B despite the smaller .text — that's 0.38.0's new ELF metadata (#656 STB_LOCAL internal symbols + #637 .ARM.attributes), which the linker drops/merges. Flash footprint tracks the 68 B .text, not the .o.

Scope: two gust_mix objects + COMPARE.md + build.rs recipe. Reporting the measured 1.50× to synth#686 as the arc toward default-on.

🤖 Generated with Claude Code

…69×→1.50×

synth 0.38.0 ships the mask-elision lever gale filed (synth#686/#692,
`SYNTH_SHIFT_MASK_ELIDE`, flag-off): it elides #682's mod-32 `AND rm,#31` shift
mask where the amount is provably <32 — exactly gale's gust_mix (Q8 constant
shifts). Re-dissolved cm3+cm4 with the flag:

  fn-only 0.675 → 0.600 ticks/call (−11%), .text 82 → 68 B (−17%),
  ratio vs native LLVM 1.69× → 1.50× — best measured on the shipped path.

Correctness-gated: gust_floor_bench soundness `mix_proven ≡ mix_native ≡
gust_mix` over [524,1524] PASSES; proof-carrying floor still 0.45×; in-range
dissolved 1.55× → 1.40×. silicon_bench links cleanly for thumbv7em.

NOTE: the relocatable .o grew 432 → 496 B despite the smaller .text — that's
0.38.0's new ELF metadata (#656 STB_LOCAL internal symbols + #637
.ARM.attributes), dropped/merged at link time, so flash footprint tracks the
68 B .text. 0.38.0 DEFAULT (flag-off) is perf-neutral (1.69×, .text 82) — the
release adopt is safe; the win needs the flag. build.rs recipe updated.

Ladder: 1.81× (stale) → 1.69× (0.37.1, #157) → 1.50× (0.38.0 elide) → 0.45×
(clamp-elision floor, synth#494 phase-2). Reporting the measured 1.50× to
synth#686 as the arc toward default-on.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe
avrabe merged commit 4efb0f8 into main Jul 10, 2026
60 checks passed
@avrabe
avrabe deleted the perf/synth-0380-mask-elide branch July 10, 2026 19:14
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