On Nov 4, 12:41 pm, boroph...@gmail.com 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.
Yes, at startup.
Can Java be used for graphics-intensive applications, such as the
latest 3D game, such as Doom/Quake/whatever is the current hot game.
Current? Well, there is e.g. a Quake 2 engine port to Java
There are other game engines, too. E.g. http://www.jmonkeyengine.com/
And there are other types of graphic intensive applications, too. CAD
systems have been written in Java, so have GIS systems. People do
complex simulations in Java and all kinds of computational intensive
If not, what are the issues that prohibit Java from being suitable.
For what? Games? Game users might be used to all kinds of long startup
times, so Java's typical long startup times might not be an issue.
Game users are also used to be able to use a number of HID devices
(joysticks, wheels). There is a total lack of out-of-the-box support
in Java for such devices. There are third-party libraries to overcome
this. There is also an almost total lack of out-of-the-box integration
into advanced sound engines. Java-sound does not cover all details.
There are maybe third-party libraries to fix this, I am not aware of
any. There is at best mediocre media support (video playing, MP3
playing). The Java media framework has been neglected for years.
What is really bad in Java is desktop integration. Interaction with
native installation management or package management does not exist.
All things which are closer to the system are bad. Dealing with
removable media in general is bad, e.g. figuring out if a CD or DVD is
in a drive can't be done with Java alone. Dealing with all kinds of
system services is bad. Typical desktop I/O (serial, USB, parallel
ports, Firewire) is not or badly supported.
There is only one compelling technical reason to do a desktop
application in Java. When you really, really, really badly, need the
cross-platform features of Java so your application runs on multiple
platforms. The price you will have to pay for this is that the
application will look and behave slightly alien on all supported
platforms. And some things won't work at all.
Finally, I have read that garbage collection is generally more
efficient than manual memory management. Is this true, and if so,
It has advantages and disadvantages. You can study the details for
ages. But in short it usually doesn't hurt and is in general "better",
unless you mess up things.
The coming JRE is going to have greatly improved startup performance.
some performance increase.