Bebbo's Virtual Machine


I did start this project since I was unsatisfied with the available Java virtual machines: I also tried some other solutions, e.g. the GNU gcj compiler (available for Windows at http://www.cygwin.com). This works fine unless the HelloWorld.java results in an executable of 2MB size.

If you want to have something done right, you have to do it yourself


The goals to reach are

Milestone 1

The code
public class HelloWorld {
  public static void main(String args[]) {
    System.out.println("Hello world!");
  }
}

results into an executable of 27.136 bytes. Woot!

Milestone 2

Milestone 3

 current measurements 

UPDATED


TestBVM speedJVM 1.5 speedgcj speed
return 023091098667224542
add18021991480195843
multiply14935789095197152
add array11705473929127408
loop10000793588
biginteger multiply475328152373
biginteger modulo397634294961
With more optimizations the code is coming close to gcj, for more complex code (less possible optimizations) the difference to gcj is even less. The performance is always better than the JVM 1.5 classic mode. This is a good base to add the missing features, but there are still some more possible optimizations.

Milestone 4

The implementation is not yet tuned for performance but tuned to be resource friendly. Since every Java object can be used with synchronized the mutex objects are created when necesarry. Let's look forward for some benchmark results. The good news is the small impact on size with all that new stuff. HelloWorld uses now 29.184 bytes.

Future

... stay tuned
rev: 1.14