Why is C faster than Java: git vs JGit
Report a link problem
Submission timeline
2007–2026One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.
Top comments
I almost skipped this link; I assumed it was typical borring blog noise. It's not. This is an insightful post from the git mailing list which shows some of the real limitations that a top tier developer hits when trying to write Java code as fast as neatly optimized C code. Definitely worth reading.
I find it interesting to read that every single one of his criticisms of JGit would not need to apply to a C# implementation. Unsigned types, unmanaged memory allocation (Marshal.Alloc), unsafe code with pointers, native P/Invoke access, value types (e.g. fixed arrays for his SHA-1 point), and an IDisposable convention for managing all the unmanaged trickery, C# has pretty much all the needed features. When optimizing C# for space use in particular (which ends up being a time optimization for…
The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.
HN stats
- Breakout years
- 2
- Total points
- 472
- Total comments
- 209
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2010-01-02 | Why git is so fast (or why Java is not as fast as C)First breakout | ssp | 139 | 107 |
| 2010-11-16 | Why Git is so fast (versus JGit) | kqr2 | 8 | 0 |
| 2012-01-12 | Why is C faster than Java: git vs JGitBest thread · Latest 20+ point return | acqq | 325 | 102 |