|
|
|
|
|
by jcoffland
4053 days ago
|
|
I'd like to see such an article on a register based VM. Pawn and Lua are nice examples. Most VMs are stack based but this is mainly because they are conceptually easier to understand. Register based machines have some real advantages, like requiring far fewer instructions inside tight loops. |
|
* In interpreted environments, registers are stored in memory anyways, so the advantage of simulating them isn't as great
* It is easier to generate code for stack machines, because you don't need to run register allocation
* There's a tradeoff in instruction complexity versus number of instructions between stack and register machines