Here's the key idea that I want to draw from partial evaluation. The result is this big blob of code, written in M, that implements the application, and includes a version of the interpreter specialized to the specific needs of the application.
Loops are unrolled, dead code is eliminated.
The resulting system has the same input and output as the original, but its performance is an order of magnitude better due to specialization stripping off the interpretive overhead. And we can get extensibility, too. We can extend the implementation of L with some new functionality f', possibly extending L to L'.