Java speed: Reality versus theory?
- From: Matthias Kaeppler <void@xxxxxxxx>
- Date: Fri, 04 Nov 2005 09:10:21 +0100
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 .
- Prev by Date: Re: C datatypes
- Next by Date: Re: Code review comment: "Noone uses tokens anymore"
- Previous by thread: Lisp and OCaml, why?
- Next by thread: Re: Java speed: Reality versus theory?