Java speed: Reality versus theory?



Hi,

I just saw this thread popping up asking about speed comparison between Java and Delphi. I'd have a slightly different question:

How come so many people claim Java to be so fast, even write papers about how great JIT and the Java runtime in general is compared to other languages, but still, each and every Java application I have /ever/ used is either slow or so /unbearably/ slow that you can't even work with it without ripping your hair out (I don't want to call names, but there are quite some very popular development tools written in Java which run awfully slow on my 3GHz machine)?

All those language and tech comparisons are nice and good (for example I have read a paper which claimed that heap allocation in Java would be way faster than in C++, because it would only take 10 machine instructions for the Java virtual machine, but up to 100 in C++), but if you leave out the theory, Java doesn't seem to even come close to the speed of say, a well written C++ program.

How come? I think one reason is that Java almost encourages sloppy programming. Creating unnecessary temporaries or locals because "the GC takes care of it anyway" seems to be common practice in Java; in C++ you think /twice/ before allocating anything, especially on the heap.

Any other ideas? I really think it's an interesting situation: One party claiming (even proving) Java to be fast, while actual real-world applications show that it's clearly not.

Regards,
Matthias
.



Relevant Pages

  • Re: Java slow ?
    ... > what could be the causes of the slowness of Java. ... designed for special purposes where speed is less important than something else ... Papers on optimisations used in JVMs that discuss ...
    (comp.lang.java.programmer)
  • CFP: PPPJ 08 conference deadline extended
    ... PPPJ 08 conference submission deadline extended! ... Papers now due: 5 May ... Programming in Java ...
    (comp.lang.java.programmer)
  • Re: Java slow ?
    ... > I often heard that Java is slow. ... The papers claim the Java is as fast as C++ is fundamentally false. ... The second example is array. ... This is why you heard Java is slow comparing with C or C++. ...
    (comp.lang.java.programmer)
  • Re: SSA, Java and Points-to Analysis
    ... > statements look like in the presence of field references? ... > SSA form for object oriented languages? ... > Does the use of SSA for Java help in points to analysis? ... I am asking this because the most recent papers on ...
    (comp.compilers)
  • Re: Java slow ?
    ... Java is slower than C/C++ and it is also faster. ... Most papers ...
    (comp.lang.java.programmer)