4 ms·
I would expect Luau to be significantly slower than LuaJIT though, because Luau doesn’t include a JIT compiler.
by pansa2 5y ago
I would expect Luau to be significantly slower than LuaJIT though, because Luau doesn’t include a JIT compiler.
- dangoor 5y agoTrue, but they claim to have gotten as fast as LuaJIT in many cases and, important for their use case, JIT doesn't work on some platforms (iOS): https://luau-lang.org/performance https://luau-lang.org/performance > On some workloads it can match the performance of LuaJIT interpreter which is written in highly specialized assembly.
- dirkf 5y agoNote how it says: "match the performance of the LuaJIT interpreter" (emphasis mine). LuaJIT basically has two parts: an interpreter in handcrafted assembly which is quite a bit faster than the standard Lua VM, and the actual JIT, which is even faster. IIRC on iOS the JIT is not allowed but the interpreter is still there.
- dangoor 5y agoGood catch! I missed the word interpreter in there.