You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: README.md
+35-10Lines changed: 35 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,20 +209,45 @@ Acceptance tests run automatically in GitHub Actions CI after the QA pipeline pa
209
209
210
210
## Performance
211
211
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
+
212
214
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.
213
215
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 |
215
243
216
-
Benchmarked against PHPUnit bare repository (231 MB, 27k commits, 3576 files):
244
+
### Scale: Linux kernel (6.1 GB, 1.4M commits)
217
245
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 | — | — |
0 commit comments