Retrofitting JIT Compilers into C Interpreters.
Laurence Tratt (15 April 2026)🔗 https://tratt.net/laurie/blog/2026/retrofitting_jit_compilers_into_c_interpreters.html
⚓ #jit #programming-languages #bcs2220 #bcs
Laurence Tratt explains a relatively simple new meta-tracing-based technique for adding a JIT compiler to an existing C-based interpreter:
What might surprise you is that we only added about 400LoC to PUC Lua, and changed under 50LoC. This hopefully makes the trade-off yk offers clear: yklua does not reach the performance peaks of the wonderful, carefully hand-written, LuaJIT; but LuaJIT is stuck in the 13 year old past of Lua 5.15, whereas yklua trivially tracks updates to PUC Lua. The point of this post isn’t to tell you that one side or the other of this trade-off is best. Rather, it’s to show that the trade-off exists, and that yk fills in a part of the design space that was largely out of bounds before.
