Building the fastest Lua interpreter automatically
sillycross.github.io
Building the fastest Lua interpreter automatically
1–10 of 114 posts
Re: Building the fastest Lua interpreter automatically
#2wow this is a great article, so readable
Re: Building the fastest Lua interpreter automatically
#3There's some prior art on DSLs for efficient interpreters, like Anton Ertl's vmgen. https://www.complang.tuwien.ac.at/anton/vmgen/
Re: Building the fastest Lua interpreter automatically
#4I think there's a typo where the Add() example code goes `lhs.As() && rhs.As()`. I'm assuming that should be a `+`?
Re: Building the fastest Lua interpreter automatically
#5Can this be done for javascript?
Re: Building the fastest Lua interpreter automatically
#6Very very impressive.
Re: Building the fastest Lua interpreter automatically
#7Fascinating! I wonder if there's a way to keep this 100% inside the C ecosystem, without having to reach for an LLVM dependency...
Re: Building the fastest Lua interpreter automatically
#8Fascinating! I wonder if there's a way to keep this 100% inside the C ecosystem, without having to reach for an LLVM dependency...
In general, probably, you'd have to replace the part where he writes the LLVM IR directly to say GCC's IR. If you mean no IR at all it doesn't sound like it based on the part about replacing the assembly from LuaJIT.
Re: Building the fastest Lua interpreter automatically
#9>More importantly, it is the world’s fastest Lua interpreter to date, outperforming LuaJIT’s interpreter by 28% and the official Lua interpreter by 171% on average on a variety of benchmarks
Wait what the hell
Re: Building the fastest Lua interpreter automatically
#10One caveat to pay attention to... Ever since LuaJIT and PUC-Lua diverged, PUC lua has made some significant changes to the garbage collector. I wonder if that might affect the comparison vs LuaJIT for memory intensive benchmarks such as binarytrees and tablesort.