My Virtual Machine

I’ve been head down, working all spare hours on my virtual machine. It is 100% original code written from scratch in C. I can’t give details yet, but it’s a register-based 32-bit VM that runs within a 32-bit or 64-bit parent application (depending on the host OS) that permits me to run multiple VMs simultaneously, each of which can run the same or different applications.

The last few days have been a whirlwind of ISA tweaks code refactoring and general mania, but today I got to the point I could run a simple test. The test application ran two loops, one nested within the other, that both iterate 65,535 times for a total of 4,294,836,225 iterations.

Turns out my VM, running within a VMWare Fusion-hosted guest Ubuntu OS on my 2.26Ghz Mac, executes 117,131,896 instructions per second.

I knew that going for a register based VM (as opposed to stack based) was a good idea 🙂

I also have a number of additional things on the plan that will radically increase the effective performance. High on the agenda at this point is to finish my assembler for it, as currently I have to hand-assemble my instructions. I should get that done in the next couple of days. Later, there will be direct assembly to native code, depending on whether the VM is running on x86 or ARM… I’ve already done some successful prototyping of the concept. At that point, I start hitting the billions of instructions/sec.

Very, very happy with the way this is going!

Tags: , ,

Comments are closed.