Copy-and-patch compilation: a super fast code generation technique https://arxiv.org/pdf/2011.13127.pdf
The performance of the generated code is an order of magnitude better than an AST interpreter, while having almost zero compilation cost compared to generating the AST in the first place.