lua-users home
lua-l archive

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


mark@grubmah.com wrote:
> Do you have a sense for where LuaJIT would rank with the JIT turned off?
> I'm curious as to whether a well tuned VM could beat V8

Ok, so I've I extrapolated the timings on my CPU to the quite
similar CPU used in the shootout -- actual results might differ:

Ratio | JavaScript V8 JIT compiler vs. LuaJIT **INTERPRETER** (!)
------+----------------------------------------------------------
      ^ V8 JIT compiler faster
      |
 0.55 |  86.74   157.37 binary-trees        N=20
 0.89 |  74.08    82.93 spectral-norm       N=5500
 1.02 | 189.51   186.61 n-body              N=50000000
 1.17 |  31.62    27.06 fasta               N=25000000
 1.19 | 670.05   561.72 fannkuch            N=12
 1.79 |  28.71    16.05 reverse-complement  N=25000000
 2.39 | 227.43    95.03 pidigits            N=10000
 2.78 | 296.01   106.58 k-nucleotide        N=25000000
      |
      V LuaJIT interpreter faster

No V8 measurements are available for meteor-contest and
mandelbrot. For pidigits I'm comparing the pure JS and Lua
programs, not the GMP bindings.

As you can see, even the LuaJIT interpreter (!) beats the V8 JIT
compiler in 6 out of 8 benchmarks and is not too far off in
another one.

[Of course the LuaJIT JIT compiler beats V8 by a wide margin,
except for the mentioned binary-trees benchmark.]

> (which is important on platforms that disallow runtime code
> generation by user mode processes).

Sure. I've previously mentioned that even an interpreter-only port
of LuaJIT to PPC (PS3, XBox 360 and Wii) might be interesting:

  http://lua-users.org/lists/lua-l/2009-11/msg00195.html

Find the sponsors and I'll do it.

--Mike