Interesting article which explains some of the basics of how virtual machines for programming languages work, and how some of the optimizations are done to help make them performant.
The author walks through a simple program in lua, then uses JavaScript to build a VM which implements the ‘objects are tables’ semantic of the lua language. The example is small enough to serve as a good basis for instruction, while illustrating the deconstruction the kinds of things a VM actually does under the hood.