3 ms·
Yes, I agree that stack-based VMs are more common than register-based VMs, and it was an unusual decision on the part of the Lua folks to choose a register-base
by kragen 18y ago
Yes, I agree that stack-based VMs are more common than register-based VMs, and it was an unusual decision on the part of the Lua folks to choose a register-based VM, particularly given their emphasis on implementation simplicity. And it appears to have paid off, which is pretty cool!
I'm glad you've enjoyed the various links.
I meant the way it behaves as both a dict and a table
You mean, a dict and an array?
I'm not sure I agree with their decision to unify those structures, but it does seem not to have cost them much implementation complexity or performance.
- silentbicycle 18y agoOops. Dict and an array, yes. Also, Lua had a stack-based VM until Lua 5.0.