Java VM Performance
During surfing, I came accross the following articles considering Java performance :
- Java Benchmark, claiming that Java is faster than C++
- And its reply : Java is not really faster than cpp
Every form of Sun's Java runtime comes with both the client VM and the server VM. Java applications and applets run by default in the client VM. Following the benchmarks, the Server VM is much faster than the Client VM, although it has the downside of taking around 10% longer to start up due to its HotSpot behavior, and it uses more memory.
To run Java applications with the server VM, use
java -server [arguments...] instead of java [arguments...]. Setting this -server parameter causes the use of an optimizing JIT compiler, due to Java HotSpot VM options.
<java classname="org.hsqldb.Server" classpathref="master-classpath" fork="true">
<jvmarg value="-server"/>
</java>
If running this results in the following error :
Error: no `server' JVM at ...
you have to copy the server folder from your Java/jdk1.5.0_10/jre/bin to the Java/jre1.5.0_10/bin folder.
P.S. For the freaks who get a thrill of performance statistics, the more reliable source is the performance shootout at Computer Language Shootout.
0 Comments:
Post a Comment
<< Home