lua-users home
lua-l archive

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


Alexander Gladysh wrote:
> I see that LJ2 performance page [1] does not show any difference in
> performance between LJ2 beta 5 and the current LJ2 Git HEAD.

That's correct.

> But there clearly were some optimizations inbetween.

Sure, there have been lots of commits between beta5 and git HEAD.
But most of them are for the PPC/e500 port or the FFI. And the
optimizations simply don't affect the benchmarks that are
currently shown.

I'll add some isolated benchmarks soon to show the performance of
the FFI data structures (sorry, no docs for this yet). In the
meantime, you can get the latest FFI-enabled SciMark for Lua here:

  http://luajit.org/download/scimark.lua

It auto-detects the availability of the FFI. This can be disabled
by running "luajit scimark.lua -noffi".

[To avoid misinterpretations: no, it does NOT call into C code.
It uses the LuaJIT FFI solely to create and access native data
structures. This required only minimal changes to the Lua code
(replace {} with a C type constructor).]

SciMark performance (-large and -small) for LuaJIT git HEAD:

x86      SciMark LARGE | FFT     SOR      MC    SPARSE    LU
-----------------------+---------------------------------------
GCC 4.4.3        623.8 |  91.0   883.5   190.4   784.7  1169.6
LuaJIT git +FFI  651.2 |  97.2  1021.9   323.4   673.7  1139.6
LuaJIT git -FFI  527.7 |  91.4  1008.5   225.6   400.0   913.2

x64      SciMark LARGE | FFT     SOR      MC    SPARSE    LU
-----------------------+---------------------------------------
GCC 4.4.3        614.7 |  97.7   883.5   228.5   734.0  1129.9
JVM 1.6.0_22     707.5 |  79.2  1118.1   385.5   658.9  1295.7
LuaJIT git +FFI  632.8 |  89.1  1035.8   298.3   648.1  1092.9
LuaJIT git -FFI  516.1 |  88.4   995.4   225.6   382.1   888.9


x86      SciMark SMALL | FFT     SOR      MC    SPARSE    LU
-----------------------+---------------------------------------
GCC 4.4.3        881.7 | 726.8   908.9   190.4  1061.3  1521.3
LuaJIT git +FFI  782.5 | 545.1  1047.3   323.4   528.5  1468.1
LuaJIT git -FFI  607.4 | 427.5  1025.0   225.6   324.4  1034.3

x64      SciMark SMALL | FFT     SOR      MC    SPARSE    LU
-----------------------+---------------------------------------
GCC 4.4.3        932.4 | 792.8   908.9   228.5  1134.8  1596.9
JVM 1.6.0_22     963.2 | 592.7  1178.9   385.5   836.7  1822.3
LuaJIT git +FFI  747.7 | 531.8  1047.3   298.3   481.9  1379.1
LuaJIT git -FFI  604.7 | 436.1  1025.0   225.6   318.1  1018.9

For comparison: plain Lua 5.1 gets scores between 16 and 23.
Lua 5.2-alpha is even slower (-30% on x64).

Benchmark environment:
- Compared with C/Java SciMark 2.0a from: http://math.nist.gov/scimark2/
- Individual scores taken from the best of three runs.
- SciMark score is the average of the individual benchmark scores.
- Intel Core2 E8400 3.0GHz running Linux, no swap, no hypervisor
- GCC 4.4.3-4ubuntu5 -march=native -O2 -fomit-frame-pointer -m32|-m64
  (-O3 performance was worse)
- Java SE 1.6.0_22, 64-Bit Server VM

--Mike