I mention this because programmers seem prone to this, and letting theory trump fact is a great way to make sure that you never learn anything.
I think it's also important to note that the slowness is relative to an incredibly fast C implementation - taking twice the time sounds painful, but in reality the pauses caused by Git are barely perceptible as-is, and double of that is not likely to be very annoying.
The title takes one specific application in a particular niche, used in a certain way which a particular programmer can't get to run fast enough, and concludes that Java isn't fast enough. Faulty logic.
The argument about JGit vs C-git for me isn't something I feel you can learn anything from.
Really? In general? That statements seams worse than the original headline. Is Java faster than C for anything?
Yes Java can be faster than C in some situations.
Can C ever be faster than assembly? Well, in theory no. But in practice, sometimes.
Depends if you're a master assembly programmer who hand optimizes everything.
Unless the person writing the C implementation is grossly incompetent, I would like to see even one example for that.
I remember I used the shortest possible integers and the register keyword in the late 80's far too many times to count.
The point of somewhat higher-level languages like Java (I refuse to say Java is a high-level language - it would be one in the late 80s, but not today) is not to make programs run faster, but to make it easier to make them run correctly.
BTW, if it's so obvious why haven't you still provided at least one non-trivial concrete example of Java faster than C?
not that it would matter much in the case anyway, I guess.
That's something I've heard ever since hotspot came out, but it's not a silver bullet to beating C/C++ etc. Here are some server tests. Some are comparable, some are definitely not: http://shootout.alioth.debian.org/u64q/java.php
http://www.reddit.com/r/programming/comments/9ic0x/java_vs_c...
And measurements:
[Edit] Actually the state-state one averages over multiples restarts including JITed and non-JITed runs.
Not actually true in reality. Modern JVMs can make on the fly optimizations based on the runtime profile, which would need to be done by hand in C.
As said elsewhere though, Java excels when used for long running tasks - servers - backends etc where it can optimize for the long term. It doesn't excel when you try and start up the jvm loads of times for quick individual jobs.
I don't understand why people are optimizing source control :/ fast vs fast meh I don't think it's an issue really.