Is LuaJIT really faster than all other dynamic JIT languages?

In accordance with the game in a computer language, the LuaJIT implementation apparently surpassed all other dynamic JIT-ed languages (V8, Tracemonkey, PLT Scheme, Erlang HIPE) by an order of magnitude .

I know that these tests are not representative (as they say: "What implementations in the programming language have the fastest test programs?"), But it is still impressive.

In practice, is this really so? Has anyone tested this implementation of Lua?

+44
lua jit luajit
Apr 6 '10 at 20:30
source share
4 answers

There's a good discussion at Lambda the Ultimate . LuaJIT is very good.

Many people have reported impressive accelerations on lua-l (the lua mailing list). Acceleration is most impressive for pure Lua code; the trace compiler is not so efficient when there are many calls to C functions in loadable library modules.

+30
Apr 6 '10 at 21:30
source share

In my case (prototype development of the game), I did not observe any performance improvement at all. I use lua for embedding, so there are many calls to C ++ library functions. Despite the fact that the main loop is in the lua script, and all the important logic is implemented in lua, the overall performance was determined using rendering engines and physical engines implemented in C ++. The original lua is already fast enough for such applications.

+16
Jan 26 '11 at 16:21
source share

I did an experiment with a lesson learned here: http://www.sampalib.org/luajit2.0_tunning.html Some data is no longer valid (maxmcode = 1024 is enough), but luajit brings a strong improvement of 600 lines of code, pure Lua script (no calling C to attack perfs ...), which is neither a large-scale application nor a built-in use case, but much more than benchmarks.

+6
May 03 '10 at
source share

JIT performance depends on two factors: the performance of the source scripting language and the performance of the compiler.

The compiler is a fairly mature technique, and most JIT compilers have comparable performance. However, lua itself, i.e. lua-without-JIT, is probably one of the fastest scripting languages.

lua is faster than Java-free-JIT. lua is faster than Javascript-free-JIT. lua is faster than most scripting languages ​​- without JIT.

So,

lua-JIT is faster than Java-with-JIT (Java Sun), lua-JIT is faster than V8 (Javascript-with-JIT), etc ...

-2
Feb 22 2018-12-12T00:
source share



All Articles