lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Feb 23, 2017 at 12:59 PM, Sergey Rozhenko <> wrote:
On Ср 22.02.17 22:13, Dibyendu Majumdar wrote:
A natural follow on question is can the interpreter be made faster
without resorting to hand-written assembly code or other esoteric

Big Yes. When I switched from plain Lua to LuaJIT I was very happy with the speedup. I didn't run the numbers, but it felt like 10x increase in speed. Then I found out that mobdebug.lua was disabling JIT, so all this speedup was from faster interpreter. Speedup from enabling JIT wasn't nearly as big.
This speedup probably comes from faster table access, but I don't know how LuaJIT achieves it.

It comes from exactly what Dibyendu wanted to avoid: hand-written assembly code. The LuaJIT interpreter is completely rewritten this way.