Building the fastest Lua interpreter automatically
This seems like an awesome way of writing faster interpreters – i.e. not in assembly, but in C++ snippets you stitch together with a tool.<p>I did peek at the deegen tool a bit, and it seems quite large? <a href="https://github.com/luajit-remake/luajit-remake/tree/master/deegen" rel="nofollow">https://github.com/luajit-remake/luajit-remake/tree/master/d...</a><p>I would be interested in an overview of all the analysis it has to do, which as I understand is basically “automated Mike Pall”<p>FWIW I think this is the hand-written equivalent with LuaJIT’s dynasm tool: <a href="https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/vm_x64.dasc" rel="nofollow">https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/vm_x64.dasc</a> (just under 5000 lines)<p>Also there are several of these files with no apparent sharing, as you would get with deegen:<p><a href="https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/vm_x86.dasc" rel="nofollow">https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/vm_x86.dasc</a><p><a href="https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/vm_ppc.dasc" rel="nofollow">https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/vm_ppc.dasc</a>