concerning register based vm architectures you might find the following a good read: "virtual machine showdown: stack vs. registers" (https://www.usenix.org/events/vee05/full_papers/p153-yunhe.p...). aside from lua and parrot, google's dalvik also uses a register architecture (afaik).
i also had a look at the lua implementation a month or so ago, and i found some other details very interesting: it uses very few instructions (<40), and it uses a very neat trick to "unify" floating point and integer numbers: by using double as the default numerical type. (compare for example to the jvm, {i, f} x {add, mult, div, .etc.})
Thank you. Excellent article. I had always suspected register VMs to be faster from my days as a compiler writer. All of this is straight forward code optimization and generation. If anyone out there is contemplating a new language, I suggest looking at this.
concerning register based vm architectures you might find the following a good read: "virtual machine showdown: stack vs. registers" (https://www.usenix.org/events/vee05/full_papers/p153-yunhe.p...). aside from lua and parrot, google's dalvik also uses a register architecture (afaik).
i also had a look at the lua implementation a month or so ago, and i found some other details very interesting: it uses very few instructions (<40), and it uses a very neat trick to "unify" floating point and integer numbers: by using double as the default numerical type. (compare for example to the jvm, {i, f} x {add, mult, div, .etc.})