Related articles |
---|
Stack, register, message based or hybrid for virtual machine? visionary25@_nospam_hotmail.com (Vis Mike) (2003-02-11) |
Re: Stack, register, message based or hybrid for virtual machine? u.hobelmann@web.de (Ulrich Hobelmann) (2003-02-12) |
Re: Stack, register, message based or hybrid for virtual machine? anton@mips.complang.tuwien.ac.at (2003-02-21) |
From: | Ulrich Hobelmann <u.hobelmann@web.de> |
Newsgroups: | comp.compilers |
Date: | 12 Feb 2003 12:47:53 -0500 |
Organization: | Compilers Central |
References: | 03-02-053 |
Keywords: | architecture, design |
Posted-Date: | 12 Feb 2003 12:47:53 EST |
Vis Mike wrote:
> Just doing a little VM coding for fun, and trying for the fastest
> solution. My stack version seems to be faster, about 25% faster than
> my register code. I assume it is because of the register lookup
> (pointer to pointer), whereas the stack version knows where to look.
Yes, stack machines are much simpler. Forth does this. The speed
question says that stack vms are more easily JITed I think. If you
have a 20register vm and want to compile for your x86, then that
sucks. I'd pick simplicity.
> I was thinking of some kind of hybrid. Anybody have any thoughts?
> I'll post the complete code if interested, just wanted to brush on the
> subject first.
Just add those registers you need for certain things, use the stack
for everything else. It might be interesting to look at the evolution
of Forth. www.colorforth.com (I think) has a *really* minimalistic
version.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.