Hello everyone,
I'm new to Lua and would like to make some comparisons regarding development time and performance.
Here is a small test to calculate 99999999 prime numbers:
-- Prime benchmark
print("Prime - Benchmark for Lua")
print()
print("' for i=0.99999998 do'")
print("' x = (((i+i+2*i)+0.621) / x)'")
print("' end'")
local i = 0
local x = 1
local t1 = os.clock()
for i=0.99999998 do
x = (((i+i+2*i)+0.621) / x)
end
print()
print(string.format("Elapsed time: %.2f", os.clock() - t1))
print("Sum: " , (x))
-- End
Elapsed Time for example:
LuaRT (v1.7.1) : ~ 1.5 s.
Lua54 : ~ 1.2 s.
Luajit (2.1.0-beta3) : 0.3 s.
Is Luajit integrated into LuaRT?