Skip to content

Commit 95ccfe8

Browse files
Lukáš Křížclaude
andcommitted
docs: update README performance section with current benchmarks
Replace old performance table with comprehensive benchmarks across four categories: working tree ops (vs native git), bare repo ops, Linux kernel scale test, and HTTP clone. PureGit handler-level performance now beats native git on most operations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 80ecda7 commit 95ccfe8

1 file changed

Lines changed: 35 additions & 10 deletions

File tree

README.md

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,45 @@ Acceptance tests run automatically in GitHub Actions CI after the QA pipeline pa
209209

210210
## Performance
211211

212+
Optimized for real-world working tree operations. PureGit's core algorithms are competitive with — and in many cases faster than — native git, with the CLI overhead dominated by PHP interpreter startup (~52 ms fixed cost).
213+
212214
Delta encoding with sliding window (window=10, max depth=50) achieves ~77% compression ratio on similar objects. Packs use OFS_DELTA format. Transport streams packs directly to disk with a bounded FIFO cache (32 MB) for index building, keeping memory usage predictable regardless of repository size.
213215

214-
### Local operations
216+
### Working tree operations
217+
218+
Benchmarked on a real-world PHP project (1 056 files, 21 gitignore rules):
219+
220+
| Operation | PureGit | Native git | |
221+
|---|---|---|---|
222+
| `status` | 12 ms | 19 ms | 1.5x faster |
223+
| `diff` | 6 ms | 13 ms | 2.2x faster |
224+
| `diff --cached` | 3 ms | 12 ms | 4.6x faster |
225+
| `log -10` | < 0.1 ms | 11 ms | > 100x faster |
226+
| `show HEAD` | < 0.1 ms | 12 ms | > 100x faster |
227+
228+
PureGit times are handler-level (warm cache). Native git times are `exec()`-based (include ~12 ms process startup). CLI wall-clock adds ~52 ms PHP interpreter startup on top.
229+
230+
### Bare repository operations
231+
232+
Benchmarked against PHPUnit bare repository (231 MB, 27k commits, 3 576 files):
233+
234+
| Operation | PureGit | Native git | |
235+
|---|---|---|---|
236+
| Resolve HEAD | 0.1 ms | 12 ms | 120x faster |
237+
| List all refs (995) | 0.2 ms | 15 ms | 65x faster |
238+
| Log 100 commits | 3 ms | 15 ms | 4x faster |
239+
| Walk HEAD tree (3 576 files) | 8 ms | 16 ms | 2x faster |
240+
| Log 1 000 commits | 27 ms | 22 ms | 1.2x slower |
241+
| Count all commits (BFS) | 289 ms | 128 ms | 2.2x slower |
242+
| Count all commits (commit-graph) | 2 ms | 119 ms | 60x faster |
215243

216-
Benchmarked against PHPUnit bare repository (231 MB, 27k commits, 3576 files):
244+
### Scale: Linux kernel (6.1 GB, 1.4M commits)
217245

218-
| Operation | Time | Peak Memory |
219-
|---|---|---|
220-
| Read HEAD commit | 25 ms | 34 MB |
221-
| Walk 3576 files | 10 ms | 34 MB |
222-
| Log 1000 commits | 13 ms | 34 MB |
223-
| Read all blobs | 235 ms | 92 MB |
224-
| Count all commits (commit-graph) | 2 ms | 36 MB |
225-
| Count all commits (BFS) | 283 ms | 62 MB |
246+
| Operation | PureGit | Native git | |
247+
|---|---|---|---|
248+
| Count all commits (BFS) | 27 s | 8 s | 3.4x slower |
249+
| Count all commits (commit-graph) | 109 ms |||
250+
| Peak memory (BFS) | 2 087 MB |||
226251

227252
### Clone (HTTP transport)
228253

0 commit comments

Comments
 (0)