Skip to content

Commit 8dba6cf

Browse files
committed
Add Benchmark
1 parent 79cf53d commit 8dba6cf

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

benchmark.lua

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
print("PROMETHEUS Benchmark")
2+
print("Based On IronBrew Benchmark")
3+
local Iterations = 100000
4+
print("Iterations: " .. tostring(Iterations))
5+
6+
print("CLOSURE testing.")
7+
local Start = os.clock()
8+
local TStart = Start
9+
for Idx = 1, Iterations do
10+
(function()
11+
if not true then
12+
print("Hey gamer.")
13+
end
14+
end)()
15+
end
16+
print("Time:", os.clock() - Start .. "s")
17+
18+
print("SETTABLE testing.")
19+
Start = os.clock()
20+
local T = {}
21+
for Idx = 1, Iterations do
22+
T[tostring(Idx)] = "EPIC GAMER " .. tostring(Idx)
23+
end
24+
25+
print("Time:", os.clock() - Start .. "s")
26+
27+
print("GETTABLE testing.")
28+
Start = os.clock()
29+
for Idx = 1, Iterations do
30+
T[1] = T[tostring(Idx)]
31+
end
32+
33+
print("Time:", os.clock() - Start .. "s")
34+
print("Total Time:", os.clock() - TStart .. "s")

0 commit comments

Comments
 (0)