Apply worktree diff to index: grit add --patch-file vs git apply --cached
repo: 10,000-file synthetic repository; canonical cached shape, scenario variants documented by the runner · 10,000 files · 1,000 commits · 800 refs
| tool | median | min | max | runs | peak memory |
|---|---|---|---|---|---|
| git | 6.4 ms | 5.9 ms | 29 ms | 20 | 9.3 MB |
| grit | 7.4 ms | 7.1 ms | 36 ms | 20 | 20 MB |
$ git apply --cached /tmp/grit-bench-scratch/daily-synth-10k/patch-file.diff
$ grit add --patch-file /tmp/grit-bench-scratch/daily-synth-10k/patch-file.diff
| date | grit commit | git | grit | grit vs git | grit peak |
|---|---|---|---|---|---|
| 2026-10-27 | 8dbc58e77 | 6.4 ms | 7.4 ms | 1.2× slower | 20 MB |
| 2026-10-26 | c7cf2c443 | 8.1 ms | 10 ms | 1.3× slower | 21 MB |
| 2026-10-25 | 2824ad391 | 7.2 ms | 9.1 ms | 1.3× slower | 18 MB |
| 2026-10-24 | 157a05dde | 7.3 ms | 8.7 ms | 1.2× slower | 19 MB |
| 2026-10-23 | bddf92f86 | 7.1 ms | 9.3 ms | 1.3× slower | 19 MB |
| 2026-10-22 | 4c131b942 | 6.5 ms | 8.7 ms | 1.3× slower | 18 MB |
| 2026-10-21 | d4844e92a | — | not run | — | — |
| 2026-10-20 | 4754ad0b9 | — | not run | — | — |