08 Jul 2003
Benchmarking free VMs
Did some benchmarks to compare the free java like environments out there. GNU gcj is just very fast. Without even trying to use any optimization flags (just -O2) it out performs all others by a very large margin. Since it is based on the GCC: GNU Compiler Collection it is also available on a lot of platform which is very nice (although I tested only on my x86 platform).
Interesting was that IKVM.NET a free VM based on GNU Classpath and Mono was almost as fast as Kaffe OpenVM. But although they show comparable benchmark scores IKVM takes a lot more time to startup and prepare the classes compared to Kaffe. The difference was sometimes measurable in seconds! So it seems that although Mono has a good JIT it (in combination with IKVM) takes alot of time to prepare/load the code before it starts really running it.
I doubt a JIT can be made as fast and be available on so much different platforms as a Ahead of Time Compiler like gcj. So I hope that people will look more into combining byte code interpreters and just in time compilers with ahead of time compilers based on gcc. As the benchmarks show gij (the GNU Interpreter for Java which comes with gcj) is not a very fast interpreter. But when running real applications it is often amazingly efficient because it uses the gcj precompiled core classes so that any use of a library function is blindingly fast. And real applications use alot of standard library calls. Especially when the standard library is as diverse as the one that comes with gcj (libgcj which is based on Classpath and modeled after the standard java classes).
And after posting my own benchmark lots of people published other benchmarks. All linked from the Free VM Benchmarks page.