vmgen: A Generator of Efficient Virtual Machine Interpreters
started 12/17/2002; 2:33:44 PM - last post 12/18/2002; 3:42:48 AM
|
|
Bryn Keller - vmgen: A Generator of Efficient Virtual Machine Interpreters
12/17/2002; 2:33:44 PM (reads: 2049, responses: 3)
|
|
vmgen: A Generator of Efficient Virtual Machine Interpreters |
... We present an interpreter generator that automatically generates code for the virtual machine instructions from simple instruction descriptions; it generates code for the [vm] interpreter, for generating [vm] code, for [vm] code disassembly, for tracing, and for profiling. The generator is designed to support efficient interpreters: it supports threaded code, caching the top-of-stack item in a register, combining simple instructions into superinstructions... We have used the generator to create interpreters for Forth and Java. The resulting interpreters are faster tahn other interpreters for the same languages. This paper also presents results for the effects of the individual optimizations suppoorted byt he generator.
I thought we already had a pointer to this, but apparently not...
This seems like an interesting and useful system, which brings the authors experience designing and maintaining Gforth to a more general audience. Does anyone know of research which shows that either stack- or register-based VMs are faster? The authors claim that stack-based VMs are faster, but I know the Parrot folks chose a register-based approach because they thought that would be faster. Is there no conclusive evidence?
Posted to implementation by Bryn Keller on 12/17/02; 2:43:04 PM
|
|
|
|
Ehud Lamm - Re: vmgen: A Generator of Efficient Virtual Machine Interpreters
12/18/2002; 2:39:18 AM (reads: 880, responses: 0)
|
|
Does anyone know of research which shows that either stack- or register-based VMs are faster?
I remember this was discussed at length on the VM mailing list.
Is there no conclusive evidence?
Isn't this the sort of thing religious wars are made of?
|
|
Wouter van Oortmerssen - Re: vmgen: A Generator of Efficient Virtual Machine Interpreters
12/18/2002; 3:22:33 AM (reads: 861, responses: 1)
|
|
where is this VM mailing list? :)
my latest VM is register based, and I can't imagine how a stack machine (as interpreter anyway) could ever compete, given that the bytecode code generator for the register VM manages to generate about half the number of instructions of the equivalent stack machine code.. it is VERY compact. And correct me if I am wrong, but the plain number of VM instructions to HLL ratio is quite a strong factor in interpreter speed.
And the cool thing is that generating / interpreting register based code is not any more work than a stack machine with the right structure (one reason everyone loves stack machines), and easy to get optimal (no superfluous moves, smallest register set possible).
|
|
Ehud Lamm - Re: vmgen: A Generator of Efficient Virtual Machine Interpreters
12/18/2002; 3:42:48 AM (reads: 905, responses: 0)
|
|
|
|
|