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 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?