[virtmach] Your VM
Stephen Pelc <email@example.com>
Tue, 29 May 2001 10:07:31 +0100
MickaŽl Pointier wrote:
> I would like to have the oppinion of everybody around here about what
> would be the "ideal" design of this kind of system for a game.
> Typically, games run on a large kind of various hardwares (from PC that
> have powerfull processors and caches to some game consoles that have
> almost no cache and very slow random access memory (but have fast
> DMA and linear access)), on various operating systems, with variables
> number of registers, and so on...
We (MPE) have done a number of VMs in commercial use, in
various implementation techniques, ranging from payment
terminals through embedded instrumentation to games. We
have supported these VMs with C and Forth compilers.
If performance is an issue, we have found that by proper
selection of the higher level functions (video display,
O/S functions and so on) an application will spend up to
80% of its time executing O/S calls. If algorithm performance
is important, then careful design of the VM itself becomes more
We have mostly used byte-coded stack-based machines because
a zero-operand architecture improves run-time execution
performance by the lack of instruction decoding logic.
However, the choice of VM design is heavily influenced by
the requirements. Are you coding for portability or for
code density? Our experience shows that for a stack-based
VM, a JIT compiler can produce very good runtime code at
the expense of installation time and the size of the JIT
compiler. Can/should you modify the VM design to support
JIT? What is the intended lifetime of the VM?
Stephen Pelc, firstname.lastname@example.org
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads