Skip to content

Performance of Java versus C++

This article surveys a number of benchmarks and finds that Java performance on numerical code is comparable to that of C++, with hints that Java’s relative performance is continuing to improve. We then describe clear theoretical reasons why these benchmark results should be expected.

Now, a developer who principally works with Delphi may or may not care whether Java is faster than C++. But what’s interesting about this article is that it directly addresses some of the fallacious points I often hear in discussions of the .NET framework.

In my experience, the most poorly performing part of the .NET framework today is Windows Forms, due to its present (and, I believe, temporary) failure to exploit video hardware acceleration. Yet WinForms performance is rarely discussed by the crowd who insists that ".NET is slow" because of a few applications they tried or a routine they wrote. Worse, I observe a reflexive tendency to blame the garbage collector for performance issues despite no effort made to profile the application and discover with certainty where the problem lies. It is prossible to have performance problems due to poor memory management, but it’s important to understand that correct use of garbage collected memory managers can make memory management faster, for reasons discussed in the link above.

In short, one must be very careful when making blanket performance pronouncements about a framework as large as Java or .NET or Win32.

Finally, for those who continue to assert without any analysis that nobody would ever want to write a DB server in .NET, consider that Borland already sells a pure Java DB server, and that its performance is quite good.

{ 2 } Comments

  1. Joe White | July 8, 2004 at 6:40 pm | Permalink

    "for reasons discussed in the link above"

    Umm… maybe I’m missing something, but what link above? The only link I see above that paragraph is "Performance of Java versus C++", which links right back to this blog post. Unless you’re counting the registration link for BorCon 2004.

  2. Craig Stuntz | July 8, 2004 at 9:15 pm | Permalink

    No, Joe, you weren’t missing anything. I appear to have forgotten to fill in the title URL. It’s fixed now, or you can click below:

    http://www.idiom.com/~zilla/Computer/javaCbenchmark.html

    Thanks for pointing this out!

Post a Comment

Your email is never published nor shared. Required fields are marked *

Bad Behavior has blocked 713 access attempts in the last 7 days.

Close