Re: Java performance
- From: Christian <fakemail@xxxxxx>
- Date: Sun, 04 Nov 2007 20:32:21 +0100
Joshua Cranmer schrieb:
borophyll@xxxxxxxxx wrote:
I am just interested in the latest stats on Java performance. A lot
of the literature appears to be out of date in this respect. Is it
true that Java performance is close to that of native compiled code?
I suppose it could be said that Java *is* natively compiled (at run
time), but there will surely be performance penalties due to bytecode
translation, at least at program startup.
In the extreme short-term (i.e., in the first few minutes), Java is
going to have noticeable impact: one comparison metric gives it about
1.2-1.3 times native code (after taking startup into account). Over
longer periods of time--especially if the server VM is used--Java
performance is near, at, or better than native compiled code.
Finally, I have read that garbage collection is generally more
efficient than manual memory management. Is this true, and if so,
why?
In most cases, yes. Part of the problem is that manual management is
manual and people are not quite as good at profiling memory as computers
are. In addition, garbage collection can more easily benefit from
parallel execution, a bonus in the coming days of multi-core CPUs and
other parallelization techniques.
though there seem to be other problems with compiling in java ...
I once heard the term "hotspotless" code used for GUI parts written in
pure java..
meaning that java's guis have the problem that they are not hot spots
... as a user won't klick each button that often resulting in gui code
not being compiled down to native code but just allways being
interpreted which might result in an unreactive GUI as an effect (or at
least a GUI that is less reactive than a native couterpart)
.
- Follow-Ups:
- Re: Java performance
- From: Arne Vajhøj
- Re: Java performance
- From: Roedy Green
- Re: Java performance
- From: Joshua Cranmer
- Re: Java performance
- References:
- Java performance
- From: borophyll
- Re: Java performance
- From: Joshua Cranmer
- Java performance
- Prev by Date: Re: Java performance
- Next by Date: random real number between 0 (inclusive) and 1 (inclusive)
- Previous by thread: Re: Java performance
- Next by thread: Re: Java performance
- Index(es):