You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ravi/tests/performance/fornum_test2.ravi

23 lines
326 B

local function x()
local j:number
for i=1,1000000000 do
j = j+1
end
return j
end
if ravi then
ravi.optlevel(2)
assert(ravi.compile(x))
-- ravi.dumpllvmasm(x)
end
local t1 = os.clock()
local y = x();
local t2 = os.clock()
print(y)
assert(y == 1000000000.0)
print("time taken ", t2-t1);
--ravi.dumplua(x)