|
|
|
|
|
by userbinator
4055 days ago
|
|
In interpreted environments, registers are stored in memory anyways, so the advantage of simulating them isn't as great ...unless the interpreter maps VM registers directly onto machine registers. With some VMs it's possible, and then you can get very good performance. |
|
Also, register VMs typically have three operands. Specialising each instruction for each possible register for three operands would result in a ridiculous volume of code.
Special purpose instructions that access fixed registers would be fine, but general purpose operand references cannot be sanely implemented in this way. Existing register VMs use memory because it's faster.