Expand description
The benchmark suite §14A.4 makes a deliverable.
What this measures. Operation counts, not time. The workload runs in
a pure-Rust JavaScript interpreter embedded in a cargo test, and a
wall-clock number from there is not comparable to a browser — reporting
one as if it were would be dishonest. What is comparable is how many
times each arm crosses into the DOM, how many nodes it allocates, how
many effects it creates, and how many times those effects re-run. Those
counts are the same in this interpreter as in V8, because they are a
property of the emitted code rather than of the engine.
What it cannot measure. React and SolidJS. §14A.4 asks for both, and both need a package manager: CI has no network and §8 forbids a Node dependency. The arms that stand in their place are a direct-emission generator (the design §16.1 rejected) and two hand-written vanilla implementations, one naive and one tuned. Nothing here should be read as a measurement against React or Solid.
The gap. each in the view is refused by this compiler (§16.5,
M5b), so the workload’s list cannot be written in ZDeceptron today. The
row body in js/benchmark.js is the compiler’s own emission for
bench/row.zd — tests/fidelity.rs proves it, and fails the build if
it drifts — but the eachInto around it is written by hand. See
BENCHMARKS.md.
Structs§
- Bundle
Size - One compiled example, in bytes.
- Emitted
- One program, compiled, in Swift’s units.
- Graph
Times - What the two graph passes cost on one program.
- Measurement
- One arm’s counts for one operation.
- Report
- Every measurement, in the order the workload produced them.
- RowShape
- The parts of a row emission that determine what the row costs.
Constants§
- BENCHMARK_
JS - The workload: five arms, ten operations, one DOM.
- DOM_
SHIM_ JS - The minimal DOM the runtime’s own tests run against.
- END_
MARKER - FOREIGN_
VIEW_ PROGRAM - The null program plus the one construct that links
foreign.js. - INSTRUMENT_
JS - Counting instrumentation layered over the runtime’s DOM shim.
- NULL_
PROGRAM - The empty-program baseline, in Swift’s shape.
- REORDER_
JS - Reordering, counted: two reconcilers, four shapes, three sizes.
- ROW_ZD
- One js-framework-benchmark row, in ZDeceptron.
- SMALLEST_
PROGRAM - The smallest program the compiler will build at all.
- START_
MARKER - SWIFT_
BYTES_ PER_ LINE - Swift’s headline: bytes of JavaScript per line of application source.
- SWIFT_
LARGEST_ APP_ JS Shop’s emitted JavaScript, in bytes.- SWIFT_
LARGEST_ APP_ LINES - Swift’s largest application,
Shop. - SWIFT_
NULL_ PROGRAM_ JS - Swift’s null program, in bytes.
- SWIFT_
NULL_ PROGRAM_ LINES - Swift’s null program: 6 lines in, 73 kB of JavaScript out.
Functions§
- benchmark_
row - The shape of the row the benchmark’s ZDeceptron arm renders.
- build
- Compile a source that is expected to build, or explain what refused it.
- bundle_
sizes - Every example this compiler can build today, sized.
- code_
lines - A ZDeceptron source line that carries a program.
- compile
- Compile a file in the repository, or fail with every diagnostic.
- deepest_
fold - How many elements an index-recursive fold gets through before the host refuses.
- emitted_
row - The shape of the row the compiler emits for
bench/row.zd. - generated_
section - The whole generated region of
BENCHMARKS.md. - linked_
runtime_ bytes - The runtime files one bundle actually links, in bytes.
- linked_
runtime_ bytes_ in - The same, for whichever build is asked about.
- program_
with_ components countinstantiations of a chain of componentsdepthdeep.- program_
with_ depth - A view nested
nelements deep around a single leaf. - program_
with_ roots defsshared definitions reachable from each ofrootsroots.- program_
with_ signals nclient signals, each declared once and read once in the view.- program_
without_ components - The same view with the components written out by hand.
- repository_
path - run
- Run the workload and collect every arm’s counts.
- run_
reorder - Count the moves a reorder costs, at three sizes and in four shapes.
- runtime_
js_ bytes - The runtime a program that renders a view and nothing else links.
- survey
- Every example that builds, sized; and every one that does not, with why.
- template_
bytes - The bytes a module spends on static markup.
- time_
graph_ passes - Time
splitandifcseparately, averaged overrepsruns. - try_
compile - Run the whole pipeline over a source, keeping the diagnostics.