Java Software Performance: Stories from Trenches
By Angsuman Chakraborty, Gaea News NetworkSunday, October 16, 2005
James Gosling blogs about Java software performance myths and posts an interesting story (below). The comments contains few more stories from the trenches as they say. Lets look at the real picture shall we?
There was a funny incident at a recent developer event where some folks had a booth where they where demo-ing a high end industrial strength C compiler and had a benchmark that they had transliterated into Java. They were comparing their compiler to GCC and Java. GCC was running at about 2/3 the performance of this high end compiler; the Java version was running at about 2/3 the performance of the GCC version. Folks were gathered around the booth and someone noticed that the script they were using to run the Java version didn’t have optimisation turned on. A few seconds with vi to add the “-server” switch and Java’s performance jumped up to match the fancy C compiler. This got the pro-GCC crowd all excited, so a bunch of them started fiddling with its command line switches. They got a bit of improvement, but not much (the original selection had been pretty good).
Author: James Gosling from Sun
In 2001 when I was working at AltaVista I started a push to move us to using Java at the front end. At the time an executive had stated that Java was 40 times slower than C, and that it was easy to proove. So he sent me 4 programs he had written 4 years previously (when Java really was slow). I had a look at them, optimised the IO a little (there was no buffering) and the result was that the java programs were only at most 10% slower than the C program (one of them was actually faster) But of course the Java program did a lot more: for one it was completely unicode enabled, whereas the c program was not. And that was before NIO.
Soon after this AltaVista moved to rewriting all of its front end in java. I left to do other things, but was told that it was a great success. (Now if only they had listened to me 5 years previously when I told the CEO that they were not making the best of the resource hidden inside hyperlinks…)
Author: Henry Story from BblFish
In yet another situation I was in, the company was prototyping in C++ because of concerns with performance. They were worried about performance in an application that was never going to see production and in the meantime spend a lot more time producing it. When questioned further one could find no basis for their concerns. They could not find one spot in the architecture where performance was so critical that it required the use of C++. Even in the face of this evidence and analysis the myth was so strong for them that they were unable to see the reality of the situation.
Author: Kirk from Java Performance Tuning
Personally I have found in bioinformatics world (high throughput distributed processing like genomic annotations) Java software performance competes favorably with C. Will the rumor mongers now finally put a stop to this “java performance issues” B.S.?
January 4, 2006: 1:07 pm
[...] It has become a fulltime jobs of some morons to reverse hype Java for several years now. First it was “Java is slow” myth which was perpetuated. It has since been debunked several times over. [...] |
How Java's Floating-Point Hurts Everyone Everywhere