lua-users home
lua-l archive

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


If there is a system that 1) is faster than vanilla lua, 2) maintains binary-compatibility with vanilla-lua, and 3) tries to catch-up with luajit, i'm also interested. 

a+
valerio

On Sun, Mar 1, 2015 at 11:22 PM, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
Hi,

I just implemented LLVM based JIT compilation of OP_FORPREP,
OP_FORLOOP and OP_MOVE in Ravi. So this allows me to run a simple
benchmark given below. Note that the benchmark is run twice and time
measured for the second run - this is to eliminate any cost of
compilation.

Results:
Lua 5.3:                                  9.36 seconds
Ravi using LLVM:                   2.823 seconds
Luajit 2.1.0:                             0.309 seconds

I do not know yet what changes I could make to improve Ravi's
performance in this test - I will wait until I have implemented most
of the other byte codes I need before delving deeper into improving
things.

-----------------------------------------------------------------------

local function x()
  local j = 0.0
  for i=2.0,1000000000.0 do
     j = i
  end
  return j
end

x()

local t1 = os.clock()
local y = x();
local t2 = os.clock()
print(y)

assert(y == 1000000000.0)
print("time taken ", t2-t1);