grit://cooking/bench/switch/sparse@sparse-unique-120k
← cookingall benchmarksraw data

grit switch · sparse @sparse-unique-120k

Sparse switch out and back, 300 visible files and 400 excluded directories

repo: 120,000-file repository with unique blobs and a 300-file visible sparse workset · 120,000 files · 2 commits · 3 refs

$ grit-bench daily --only switch/sparse@sparse-unique-120k2026-10-27 · grit 8dbc58e77 · git version 2.43.0
toolmedianminmaxrunspeak memory
git75 ms74 ms76 ms517 MB
grit761 ms750 ms778 ms557 MB
grit is 10× slowermemory: 3.3× more
every timed run (log scale)
git
grit
59 ms979 ms
How it's measured
git runs
$ git switch --detach sparse-base && git switch --detach sparse-edited
grit runs
$ grit switch --detach sparse-base && grit switch --detach sparse-edited
checked first
before timing, git and grit were each run once and their results compared
Where the time goesone extra traced run per tool, outside the timed runs
git · median run 75 ms
unpack_trees: unpack_trees ×4
68 ms
unpack_trees: traverse_trees ×4
55 ms
index: refresh ×2
2.1 ms
cache_tree: update ×2
0.9 ms
index: do_write_index ×2
0.5 ms
index: clear_skip_worktree_from_present_files ×2
0.4 ms
index: do_read_index ×2
0.3 ms
cache_tree: read ×2
0.1 ms
unpack_trees: clear_ce_flags(0x00000000,0x02000000) ×2
0.1 ms
cache_tree: write ×2
0.1 ms
unpack_trees: clear_ce_flags(0x00080000,0x42000000) ×2
0.0 ms
grit · median run 761 ms
grit.index.write ×2
528 ms
grit.repository.open ×2
0.4 ms
grit.config.load ×6
0.3 ms
grit.index.read ×2
0.3 ms
grit.pack.index.open ×2
0.0 ms
Every day8 days
dategrit commitgitgritgrit vs gitgrit peak
2026-10-278dbc58e7775 ms761 ms10× slower57 MB
2026-10-26c7cf2c443—not run——
2026-10-252824ad391—not run——
2026-10-24157a05dde—not run——
2026-10-23bddf92f86—not run——
2026-10-224c131b942—not run——
2026-10-21d4844e92a—not run——
2026-10-204754ad0b9—not run——