Measures the shared public API surface across language ports and renders a
color heatmap matrix into the root README.md.
# From repo root — runs every language runner
python3 bench/run_all.py
# Only selected languages
python3 bench/run_all.py --only go,lua,nodejs,rust
# Re-render README/SVG from existing results (no re-run)
python3 bench/render_matrix.pyResults land in:
bench/results/latest.json— machine-readable timings (ns_per_op)bench/matrix.png— heatmap image embedded in the root READMEbench/matrix.svg— vector source of the same heatmap- Root
README.mdsection between<!-- BENCH_MATRIX_BEGIN -->markers
Rendering the PNG requires Pillow (pip install pillow). Without it, the
harness still writes the SVG and falls back to that image link.
See workload.json. Each op is timed alone (with a short
warmup). Lower ns_per_op is better. Cell colors are relative within each
row (green = faster ports for that API, red = slower).
All 14 language ports are wired:
c, cpp, dotnet, go, java, kotlin, lua, moonbit, nodejs,
python, rust, swift, wasm, zig
Notes:
- Swift bench executable lives in
swift/Sources/FileFsBench(SwiftPM cannot depend on sources outside a package root). - MoonBit runs on the JS target (
moon run --target js) for high-resolutionperformance.nowtiming. - Wasm is an in-memory port: some ops (
mount_umount,seek_tell_rewind) use the closest available API equivalents.
- Emit a single JSON object on stdout:
{
"language": "go",
"runtime": "go1.22",
"ops": {
"mkfs": {"ns_per_op": 12345, "iters": 40},
"write_4kib": {"ns_per_op": 99999, "iters": 40}
}
}-
Register a command in
bench/run_all.py(RUNNERSmap). -
Re-run
python3 bench/run_all.py --only <lang>.