Another shot fired in the "Java vs. C++" war is the The Java is Faster than C++ and C++ Sucks Unbiased Benchmark. Right away, you can tell that this is an unbiased benchmark (because it says so right in the title!). Anyway, this page compares the performance of C++ vs. Java for a number of benchmarks (taken from the now retired Great Computer Language Shootout). Java does well when compared to C++ in these tests.

I've been around the block enough times to be a bit leary of any performance claims (remember Apple's "fastest PC), nevertheless, there's enough info (including code) on the page to allow anyone to reproduce the numbers.

At the bottom of the benchmark page is a set of links to a few other sets of Java vs. C or C++ comparisions including a reference to FreeTTS - A Performance Case Study, a paper written by our speech team here in Sun Labs. This paper describes the performance issues we encountered when developing FreeTTS. I think it is a pretty good representation of the issues involved in developing a high-performance Java application along with a comparision between a Java and a native-C version of the same application. This paper describes how we ported a native-C synthesizer (Flite) to Java (FreeTTS) and how were able to get better performance from our engine.


C# is better than Java! he he Java will naturally be slower at some things, (Except things like JSP, etc) .. its not very well optimized due to its cross platform nature.

Posted by z on June 15, 2004 at 06:08 AM EDT #

z: you are an idiot

Posted by aaa on June 15, 2004 at 07:37 AM EDT #

The case study is only of limited value. It compares a C program (Flite) with Java. C though, is not an object-oriented language and does not contain the corresponding constructs that Java, C++ or C# offer. Structures like HashMaps or String classes do not exist in C.

Posted by Andreas Balogh on July 06, 2004 at 12:41 PM EDT #

Andreas: You are indeed correct that there are some fundamental differences between C and Java. However, we did a direct port of Flite to FreeTTS. Yes we did things the 'java way' where appropriate, but the overal algorithms used and system architecture between Flite and FreeTTS are identical to the point where the audio output of the two programs are byte-for-byte compatible. I think that the performance comparison is valid because of this.

Posted by Paul on July 25, 2004 at 06:41 PM EDT #

"The Great Computer Language Shootout" has been revived for several months:

Posted by Isaac Gouy on November 09, 2004 at 03:42 PM EST #

Post a Comment:
Comments are closed for this entry.

This blog copyright 2010 by plamere