Tooling & Backends
Benchmarks & Budgets
Full B1–B14 verified measurements on pinned V8 (Node v24.22.1) and JavaScriptCore (Bun 1.3.14), estimated lower-bound floors, and pay-for-what-you-use lowering tiers.
Verification & measurement discipline
Exp's performance budgets live in EXP_STYLE.md §2 and are measured against
explicit lower-bound floors stored in benchmarks/floors.json. Every JavaScript
budget (B1–B7) is measured across 10 warmed-up runs on both
pinned V8 (Node v24.22.1) and pinned JavaScriptCore (Bun 1.3.14),
while every compiler budget (B8–B14) is verified with deterministic
work counters and counting allocators.
Stratified lowering tiers (Tiers 0–5)
| Tier | Inferred Row / Form | Lowering Strategy | Runtime Cost | Budget |
|---|---|---|---|---|
| Tier 0 · Pure Code | ! {} | Plain ES2022+ functions, switch over compact int tags, monomorphic records | 0 B runtime · 0 capability args | B1 ≤ 1.05×, B2 = 0 B |
| Tier 1 · Service Handlers | ! {Users, Cache} | Compile-time topological DI wiring, static handler specialization / direct calls | 0 heap allocs · no service container | B3 ≤ 1.05× |
| Tier 2 · Structured Loops & Blocks | for / while / each / fold | Native JS loops + inlined literal-block combinators (#inline_blocks verified) | 0 closure allocs | B1 ≤ 1.05× |
| Tier 3 · Typed Errors & Cleanup | ! {Fail<E[A | B]>} | Monomorphic tagged result / local jumps + LIFO try/finally for defer & affine close | 0 new Error() · 0 stack capture | B4 ≤ 1.15× |
| Tier 4 · Colorless Concurrency | ! {Async} | Native async/await + scope token; sync callers specialize to sync JS | 0 Promises in sync instantiations | B6 = 0 Promises |
| Tier 5 · Control Handlers | with resume (1-shot / multi) | Isolated continuation lowering emitted strictly for reachable subgraphs | 4,128 B min / 1,984 B gz full runtime | B7 ≤ 8 KB min / 3 KB gz |
Full B1–B14 verified results vs floors
Budgets represent minimum acceptance criteria; progress is tracked against each metric's
hardware/hand-written lower-bound floor (EXP_STYLE.md §14.10).
| ID | Metric | Measured (V8 / Native) | Measured (JSC) | Budget | Floor | Status |
|---|---|---|---|---|---|---|
| B1 | Pure .exp compute vs hand-written JS | 0.992× | 1.006× | ≤ 1.05× | 1.00× | PASS |
| B2 | Pure module emitted JS runtime bytes | 0 B | 0 B | 0 B | 0 B | PASS |
| B3 | Static service handler op vs direct JS call | 1.000× (0 allocs) | 1.002× (0 allocs) | ≤ 1.05×, 0 allocs | 1.00× | PASS |
| B4 | Sync Fail<E> raise-and-handle vs tagged-result JS | 0.931× (0 Error) | 0.666× (0 Error) | ≤ 1.15×, 0 Error | 1.00× | PASS |
| B5 (Time) | Full DI + errors + scopes + concurrency vs effect@3.22.5 wall time | 0.034× (29× faster) | 0.055× (18× faster) | ≤ 0.25× | 0.05× | PASS |
| B5 (Heap) | Heap allocations vs idiomatic effect@3.22.5 | 0.06× | 0.07× | ≤ 0.25× | 0.05× | PASS |
| B5 (Bundle) | Gzipped bundle bytes vs effect@3.22.5 | 0.042× | 0.042× | ≤ 0.15× | 0.03× | PASS |
| B6 | Sync instantiation of effect-polymorphic helper | 0 Promises, 0 ticks | 0 Promises, 0 ticks | 0 Promises, 0 ticks | 0 | PASS |
| B7 | Full JS runtime footprint (supervision, cancellation, multi-shot) | 4,128 B min / 1,984 B gz | 4,128 B min / 1,984 B gz | ≤ 8 KB min / ≤ 3 KB gz | 4 KB / 1.5 KB | PASS |
| B8 | Cold full pipeline throughput (single core, Odin) | 636,000 LOC/s | — | ≥ 500,000 LOC/s | 2,000,000 LOC/s | PASS |
| B9 | Incremental body-only edit p99 (50,000-LOC workspace) | 1.64 ms | — | ≤ 5.0 ms | 0.25 ms | PASS |
| B10 | No-op rebuild latency & work counters | 0.70 ms (0 files) | — | ≤ 2.0 ms (0 files) | 0.15 ms | PASS |
| B11 | Cold build peak resident memory | 1.088 KB/LOC | — | ≤ 1.50 KB/LOC | 0.35 KB/LOC | PASS |
| B12 | Long-lived LSP/MCP committed memory after 200 edits | 1.007× steady | — | ≤ 1.25× steady | 1.00× | PASS |
| B13 | Idle LSP / watch / MCP over 60 s | 0 builds · 0.000 wakeups/s · 0.0% CPU | — | 0 builds · ≤ 1/s · ≤ 0.1% | 0.0 | PASS |
| B14 | Stripped release compiler binary (exp-release) | 2.14 MB | — | ≤ 4.00 MB | 0.50 MB | PASS |
Conformance matrix (92/92 features)
| Phase | Scope | Passing | Verification Gates |
|---|---|---|---|
| Phase 1 | Core syntax, HM + row inference, Maranget match, loops, Tier 0 pure JS, Source Maps & .d.ts | 37 / 37 | T0 vs JS (V8 + JSC), negative tests, tsc --strict, 0 B runtime check |
| Phase 2 | Lexical capabilities, compile-time DI wiring, Fail<E[...]> subtraction, affine + defer, with resume | 20 / 20 | T0 vs JS, linearity/escape negative tests, 0 Error alloc check |
| Phase 3 | Colorless Async, Async.scope, combinators, virtual clock, sync specialization, #extern | 15 / 15 | T0 vs JS, 0 Promise sync check (B6), tsc --strict --moduleResolution NodeNext .d.mts & bigint boundary |
| Phase 4 | CLI, LSP, MCP, exp fmt/fix/diff/sig, incremental early cutoff, fuzzers, Effect-TS parity | 16 / 16 | Work counters, 0-leak counting allocator, differential + adversarial fuzzers, B5/B8–B14 |
| Phase 5 | Interchangeable standalone C99 backend over unchanged Core IR | 4 / 4 | Three-way T0 / JS / C99 differential parity, zero JS leakage proof |