[virtmach] First VM
Mon, 13 Nov 2000 18:49:47 -0700
Nicolás Ojeda Bär wrote:
> I compiled it and tried it out, and found it quite good .. =].
> One thing that I would have done different is the implementation of the
> execute loop: instead of a giant switch statement, I would have used a
> jump table indexed by opcodes pointing to function pointers implementing
> each one of the instruction. These functions would receive a pointer to
> a VM structure and modify its registers and data accordingly ...
I just finished ripping out that massive switch statement and put in
a direct threaded implementation using a table of labels and goto.
but now the new version is irreversibly GCC only...
It made it 13% faster :)