3 ms·
Sounds like it’s similar to how LuaJIT works [0], using a machine-code handler for each VM opcode. AFAICT LuaJIT also uses a templating system to build these, e
by pansa2 6y ago
Sounds like it’s similar to how LuaJIT works [0], using a machine-code handler for each VM opcode. AFAICT LuaJIT also uses a templating system to build these, except it generates them at compile-time instead of at run-time. I assume that’s easier than explicitly writing out each handler in assembly language.
[0] https://www.reddit.com/r/programming/comments/badl2/luajit_2_beta_3_is_out_support_both_x32_x64/c0lrus0/ https://www.reddit.com/r/programming/comments/badl2/luajit_2...
- tekknolagi 6y agoYep, this is very similar.