lua-users home
lua-l archive

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

2011/2/16 Leo Razoumov <>:
> Would it be meaningful to port Geoff's Lua minimal raytracer to
> JavaScript and then redo the benchmarks?
> Comparing crappy Lua to crappy JS code makes no one no good.

Well, of course it is possible to do another benchmark but what I
understood about LuaJIT2 vs JavaScript V8 is that, as soon as there is
any important pressure to the GC with a ton of small objects the GC
will became dominant and JavaScript V8 will win because they have
probably a better GC.

For the other side, for well written procedural-style code LuaJIT2
will always win the comparison with a comfortable marge. This is also
something that make LuaJIT2 attractive for numeric computations.

Something that I've understood, but I'm less sure about that, is that
LuaJIT2 try hard to find the really hot spot of the code and optimize
very well its execution but other JIT like V8 are may be more
effective for overall optimizations. The idea is that if LuaJIT2
manage to really find the hot spot it is going to have near-optimal
performances but if it does fail it is going to choke with
performances comparable to interpreted execution.

I've a quite confused idea about this last point but in any case I
hope I will not offend anyone with my comments :-)