Skip to content

research(gust): the 0.7× roadmap — meld/loom/synth beating LLVM#119

Open
avrabe wants to merge 1 commit into
mainfrom
research/beat-llvm-0.7x
Open

research(gust): the 0.7× roadmap — meld/loom/synth beating LLVM#119
avrabe wants to merge 1 commit into
mainfrom
research/beat-llvm-0.7x

Conversation

@avrabe

@avrabe avrabe commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Sets the bar at 0.70× (dissolved 30% faster than native LLVM) — the leapfrog thesis as a measurable goal — grounded in the gust_mix disasm.

Tier 1 (→1.0× parity): algebraic fold (256*x>>8 → x), optimal leaf prologue (synth#428/#471), branchless clamp.

Tier 2 (→0.7×, beat LLVM): what LLVM can't have — proof-carrying facts (loom carries Verus ranges → synth elides clamp branches per-composition; a proven ch range collapses gust_mix to add #476), optimal regalloc on tiny functions, whole-program specialization after meld fusion.

The claim: verified code faster than the native build because the proof is an optimization input. Filed to synth/loom/meld. Kill-criterion in-doc.

🤖 Generated with Claude Code

… just match it

Sets the bar at dissolved/native = 0.70x (30% faster than native LLVM), the
wasm-LTO leapfrog thesis as a measurable goal. Grounded in the gust_mix disasm
(synth 0.15.0, 1.81x today):

- gust_mix is algebraically clamp(ch+476, 1000, 2000); synth emits the literal
  256*x>>8 (never folds to x), a 6-reg leaf prologue, and a redundant uxth.
- Tier 1 (-> ~1.0x parity): algebraic mid-end fold + optimal leaf prologue
  (synth#428/#471) + branchless clamp. "Do what LLVM does."
- Tier 2 (-> 0.7x, BEAT LLVM): use what LLVM structurally lacks —
  (a) PROOF-CARRYING FACTS: loom carries Verus value-ranges/no-alias as IR
      premises; synth specializes per-composition (e.g. a proven ch range makes
      BOTH clamp branches dead -> gust_mix collapses to `add #476`, which LLVM
      will never emit because it never had the proof);
  (b) OPTIMAL regalloc on tiny whole-known functions where LLVM bails to heuristics;
  (c) whole-program specialization after meld fusion (cross-TU value flow LLVM
      can't see).

The claim: verified code FASTER than the unverified native build, because the
proof is an optimization input. Kill-criterion: gust_codegen_bench ratio < 1.0
then <= 0.70, correctness bit-identical (clamp elision sound only under the bound).
Filed to synth/loom/meld.

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

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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