lua-users home
lua-l archive

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


Michal Kottman wrote:
> It looks like LuaJIT is 5x times faster than standard Lua on my phone
> (if I understand the results correctly). For comparison, on my Core i3
> M350 laptop I get a SciMark score of 12.55 for Lua, and 588.47 for
> LuaJIT, so the difference is not as big, but it definitely is great to
> have LuaJIT running on Android :)

Note that you're comparing the two _interpreters_, because there's
no JIT compiler for ARM, yet. A 5x speedup isn't too bad then, no?
More ARM results here: http://luajit.org/performance_arm.html

In fact, the average Lua vs. LuaJIT interpreter speedup on x86/x64
is lower. Compare with the results here (you need to select the
interpreters): http://luajit.org/performance_x86.html

And even when the ARM JIT compiler is finished, you won't see such
a drastic speedup for SciMark on a soft-float device. The underlying
FP operations are very expensive (62 cycles for an FP addition!) and
put a hard limit on the minimum execution time.

In other words: FP-heavy benchmarks are not necessarily the most
representative benchmarks for soft-float devices. :-)

For integer-heavy benchmarks, the ARM JIT compiler _will_ get into
the 10x-100x region. Some characteristics of these low-end devices
heavily penalize interpreters in comparison to native code.

[I want to let the ARM interpreter sit in the git repo for a week
or two of testing and then release beta7. Work on the ARM JIT
compiler will start after that.]

--Mike