Phase 1 Benchmarks

These numbers are the first local baseline for the proof-of-concept runtime. They are not product performance promises; they give us a repeatable way to see whether future runtime changes move Krate in the right direction.

Reference Machine

FieldValue
Date2026-05-02
CPUApple M4
Cores10 physical / 10 logical
Memory16 GB
OSmacOS 26.3.1 (25D2128)
Architecturearm64
Rustrustc 1.91.1
Wasmtime43.0.2

Microbenchmarks

Run with:

scripts/build-phase1-components.sh
cargo bench -p krate-runtime --bench startup
scripts/check-benchmark-regression.sh
MetricBaselinePhase 1 targetNotes
Wasmtime engine construction864 ns< 100 msMeasures Runtime::new.
Component::from_binary for hello-world2.366 ms< 20 msMeasures component compilation from bytes.
Cold runtime run to run() completion2.451 ms< 200 msIncludes runtime creation, compile, instantiate, and one host print to a sink.
First host print on a loaded component10.067 usTrackMeasures instantiate plus one host call with output suppressed.
1,000 host print calls on a loaded component88.189 us< 1 us/callCriterion throughput: about 88 ns per call including loop overhead.
RSS after hello-world exits14.9 MiB< 40 MiBMeasured with /usr/bin/time -l on macOS.

The committed JSON baseline lives at docs/book/src/phase1/benchmark-baseline.json. CI runs the same benchmark suite and emits a warning if a metric is more than 10% slower than the recorded baseline. It does not fail the build during Phase 1 because GitHub-hosted runners are noisy.

Binary Size

ArtifactSize
target/release/krate11 MB
dist/krate-0.1.0-dev-aarch64-apple-darwin.tar.gz4.4 MB

Notes

  • The host output is routed to an in-process sink for microbenchmarks so terminal I/O does not dominate host-call dispatch measurements.
  • There is no AOT cache yet. Phase 2 can use this baseline to prove cache wins.
  • The benchmark suite is small enough to run in CI, but the published baseline should be refreshed only from the documented reference machine.