What happens when you take a compiler's registers away, one at a time, and watch the spills — and the clock — climb?
An interactive report. Stock gcc accepts -ffixed-<reg>, which removes a
register from the allocator's pool for good. spillbench compiles nine small
kernels over and over, reserving one more register each pass, and for every
build reads the spill count out of the disassembly and times the
workload on this machine. Two register files are exercised: the
general-purpose integer registers (hashes, ciphers, integer matmul,
compression, sorting) and the XMM vector registers (double-precision matmul,
an FIR filter, Mandelbrot).
Every build is checked against a known answer before it is timed — starving the allocator changes the cost, never the result.
Served at https://spillbench.rjp.io behind halcyon's Caddy front door. The container publishes nothing to the host.
| Path | What |
|---|---|
src/main.rs |
The axum server — serves static/, answers /healthz. |
static/index.html |
The report: hand-drawn SVG charts, one interactive control. |
static/results.json |
The measurements the page renders. Generated, committed. |
bench/ |
The measurement harness (Rust) and the kernels (C). Host-only. |
The numbers are specific to the machine that produced them, so the harness runs
on the host, not in the container. It needs gcc and objdump on PATH.
cd bench
taskset -c 3 cargo run --release --bin bench -- 15 # 15 = timing repetitions
# writes ../static/results.jsonPin to an otherwise-idle core; the harness reports the minimum time over the
repetitions, the run least disturbed by the scheduler. See bench/README.md for
what each kernel is and how spills are counted.
cargo run # http://127.0.0.1:8000
curl -fsS localhost:8000/healthz # -> okThe checkout under halcyon/spillbench/ is the deployment — no separate
release step.
cd ~/code/halcyon && bin/sync spillbenchbin/sync builds the image (the bench/ harness is excluded), brings the stack
up, and verifies Caddy is serving spillbench.rjp.io.
SPILLBENCH_PORT (default 8000) and SPILLBENCH_STATIC (default static).
The app is stateless. Secrets live in halcyon/secrets/spillbench.env, which
halcyon symlinks here as .env — never commit it.