This benchmark compares the historical Rust solver from commit da725dba93f61099d264bc597d22ff388d09d2ad against the current C solver at HEAD.
- Rebuilds the Rust implementation from
benchmark/rust - Rebuilds the current C implementation from
src/c - Loads both Node targets
- Verifies the same challenge cases before timing them
- Reports average time per solve and the relative speedup
bun --cwd benchmark run benchOptional environment variables:
BENCH_ITERATIONScontrols the timed loops, default10BENCH_WARMUPcontrols warmup rounds, default2
This repo also includes a browser-hosted version that loads the wasm modules in a real browser context.
bun --cwd benchmark run bench:browserThen open the printed local URL. You can override the browser benchmark loop counts with query
parameters like ?iterations=20&warmup=3.
makeclanggitrustup- the
wasm32-unknown-unknowntarget installed for the rustup-managed toolchain