[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua versus Ravi versus Luajit - a simple benchmark
- From: Dibyendu Majumdar <mobile@...>
- Date: Thu, 5 Mar 2015 22:53:05 +0000
Hi,
This is another test. It is a modified version of the first fornum
test just to make things a bit more difficult.
local function x()
local j = 0.0
for i=2.0,1000000000.0 do
j = i
for k=3,5 do
j = k
end
end
return j
end
You can see the test programs, and generated LLVM IR at:
https://github.com/dibyendumajumdar/ravi/tree/master/ravi-tests
C:\github\ravi\ravi-tests>\luajit\luajit.exe fornum_test3.lua
5
time taken 7.806
C:\github\ravi\ravi-tests>\luajit\luajit.exe fornum_test3.lua
5
time taken 7.927
C:\github\ravi\ravi-tests>\luajit\luajit.exe fornum_test3.lua
5
time taken 7.92
C:\github\ravi\ravi-tests>\lua-5.3.0\src\build\Release\lua.exe fornum_test3.lua
5
time taken 53.932
C:\github\ravi\ravi-tests>\lua-5.3.0\src\build\Release\lua.exe fornum_test3.lua
5
time taken 54.64
C:\github\ravi\ravi-tests>\lua-5.3.0\src\build\Release\lua.exe fornum_test3.lua
5
time taken 54.584
C:\github\ravi\ravi-tests>..\build\Debug\lua.exe fornum_test3.lua
2>fornum_test3.ll
5
time taken 17.196
C:\github\ravi\ravi-tests>..\build\Debug\lua.exe fornum_test3.lua
2>fornum_test3.ll
5
time taken 15.92
C:\github\ravi\ravi-tests>..\build\Debug\lua.exe fornum_test3.lua
2>fornum_test3.ll
5
time taken 16.371