gbash

Benchmarks

Cross-runtime comparison of gbash against GNU bash and alternative sandboxed-shell runtimes. Each scenario is run as an independent process invocation - measuring real end-to-end latency including startup, execution, and teardown.

Runtimes

RuntimeDescription
gbashNative Go binary - the default runtime
GNU bashHost system bash (unsandboxed baseline)
gbash-extrasgbash with awk, html-to-markdown, jq, sqlite3, yq pre-registered
gbash-node-wasmgbash compiled to WebAssembly, run in Node.js
just-bashPublished npm package (just-bash@2.13.0)

Runtime Results

Test Environment

MachineMacBook Pro (Mac15,8)
ChipApple M3 Max
Cores16 (12 performance + 4 efficiency)
Memory64 GB
OSmacOS 15.5
Gogo1.26.1 darwin/arm64
Runs per scenario50
GeneratedMarch 15, 2026

startup echo

Process start plus one simple command.

echo benchmark

RuntimeMinMedianp95Artifact Size
gbash
4.8ms5.3ms7.5ms14.0 MiB
GNU bash
4.0ms4.8ms6.1ms875.9 KiB
gbash-extras
7.8ms8.7ms13.2ms33.0 MiB
gbash-node-wasm
110.0ms120.5ms154.2ms19.3 MiB
just-bash
708.2ms778.4ms991.7ms131.1 MiB

workspace inventory

Process start plus a pipe-free workspace inventory.

set -- $(find . -type f); echo $#(300 files, 16.7 KiB)

RuntimeMinMedianp95Artifact Size
gbash
12.2ms12.8ms13.7ms14.0 MiB
GNU bash
10.9ms12.1ms13.3ms875.9 KiB
gbash-extras
15.0ms15.5ms16.0ms33.0 MiB
gbash-node-wasm
157.9ms162.9ms165.6ms19.3 MiB
just-bash
772.4ms816.0ms950.9ms131.1 MiB

agentic workspace audit

Recursive workspace audit across mixed files plus jq summaries.

printf 'files=%s\nmatches=%s\nbad_jobs=%s\ntier1=%s\n' "$(find . -type f | grep -c '^')" "$(grep -RniE 'timeout|rollback' . | grep -c '^')" "$(jq -s 'map(select(.status != "ok")) | length' logs/*.jsonl)" "$(jq '.services | map(select(.tier == 1)) | length' manifests/services.json)"(300 files, 20.2 KiB)

RuntimeMinMedianp95Artifact Size
gbash
Skipped: requires jq; runtime does not bundle it
---14.0 MiB
GNU bash
29.3ms33.0ms37.5ms875.9 KiB
gbash-extras
53.9ms54.6ms55.9ms33.0 MiB
gbash-node-wasm
Skipped: requires jq; runtime does not bundle it
---19.3 MiB
just-bash
761.1ms799.9ms1.04s131.1 MiB

Artifact Size

Total distributable size per runtime.

RuntimeSize
gbash14.0 MiB
GNU bash875.9 KiB
gbash-extras33.0 MiB
gbash-node-wasm19.3 MiB
just-bash131.1 MiB

Runtime Methodology

  • Each scenario runs the command as a fresh process invocation (cold start).
  • A single untimed warmup run precedes the timed trials to prime OS caches.
  • Latency is measured wall-clock from process spawn to exit.
  • Artifact size includes all files needed to run the runtime (e.g., for just-bash, this includes Node.js itself plus the npm package).
  • Participating runtimes execute the same shell command and validate stdout matches the expected output.
  • Scenarios that require optional commands can mark unsupported runtimes as Skipped with a reason instead of treating them as failures.
  • The harness source is at scripts/bench-compare/main.go.

Note: just-bash ships significantly more functionality than gbash today - Python and lightweight JavaScript runtimes are bundled in the core - so the artifact sizes and startup costs are not directly comparable.