> emubench
A benchmark harness for choosing the simulation kernel language and execution substrate.
Objectives
- Decide, with measurements instead of taste, which language and execution model should run the sharded universe simulation.
- Compare throughput, shard density and snapshot cost across three implementations of one kernel.
Qualities
- Bit-exact determinism: Go, Rust and Rust compiled to WebAssembly must agree on per-tick state hashes.
- One pinned golden trace, so a divergence is caught immediately and can be bisected.
- Equal-terms comparison: the same kernel, the same inputs, the same output contract.
Technical details
Three implementations of one deterministic kernel, plus the scripts that compare and measure them.
-
go/internal/coreis the reference kernel and codec behindcmd/emubench. -
rust/is a port of the same core with#![forbid(unsafe_code)];rust-wasm/guestbuilds it as awasm32-wasip1cdylib andrust-wasm/hostruns it underwasmtimewith a memory cap and fuel metering. -
scripts/compare.shis the gate;scripts/measure.shrecords local numbers;golden/holds the reference hash vector. -
VIEWER.mdandviewer/sketch the exploration interface: a 1,000-agent world in a worker, drawn on a canvas with live statistics.
Not publicly accessible; it is a command-line harness with a local viewer.