Benchmark that has Claude Code (Opus) implement "MiniGit" (a minimal git clone) in multiple languages, comparing generation time, LOC, token usage, and pass rate.
SPEC-v1.txt # MiniGit v1 spec (init/add/commit/log)
SPEC-v2.txt # MiniGit v2 spec (v1 + status/diff/checkout/reset/rm/show)
test-v1.sh # v1 test suite (11 tests)
test-v2.sh # v2 test suite (30 tests)
benchmark.rb # Benchmark runner (Ruby)
report.rb # Report generator (results.json -> report.md)
plot.py # Graph generator (results.json -> figures/*.png)
results/
results.json # Raw result data
meta.json # Environment metadata
report.md # Generated report
figures/ # Generated graphs
The data branch (orphan) contains:
generated/ # Source code generated by Claude (binaries removed)
minigit-{lang}-{trial}-v1/
minigit-{lang}-{trial}-v2/
logs/ # Claude JSON output logs
minigit-{lang}-{trial}-v1.json
minigit-{lang}-{trial}-v2.json
- Run
ruby benchmark.rb - For each language x trial:
- v1: Create
generated/minigit-{lang}-{trial}-v1/, copy spec and tests, invokeclaude -p - v2: Copy v1 result to
minigit-{lang}-{trial}-v2/, invokeclaude -pto extend
- v1: Create
- Run test scripts independently to verify
- Measure wall-clock time, LOC, token usage, and cost
- Run
ruby report.rbto generate the report - Run
python3 plot.pyto generate graphs
ruby benchmark.rb # All languages x 3 trials
ruby benchmark.rb --lang python --trials 1 # Single language test
ruby benchmark.rb --trials 10 --start 11 # Trials 11-20
ruby benchmark.rb --dry-run # Dry run
ruby report.rb # Generate report
python3 plot.py # Generate graphsrust, go, c, typescript, javascript, java, perl, python, python/mypy, ruby, ruby/steep, lua, scheme, ocaml, haskell
To add a language, add an entry to the LANGUAGES hash. Tests just call ./minigit, so the implementation only needs to produce an executable with that name.
- Custom hash function "MiniHash" (FNV-1a variant, 64-bit, 16-char hex output)
- Data stored under
.minigit/(objects/, commits/, index, HEAD) - No external libraries allowed, stdlib only
- Exact string matching required (determinism rules)
- This is not a git repository for MiniGit itself; individual implementations under
generated/may usegit initas part of their build process - The
databranch is an orphan branch with no common history withmain