forked from Mirror/wren
Mainly to get rid of one top level directory. But this will also be useful when there are tests of the embedding API.
20 lines
286 B
Lua
20 lines
286 B
Lua
local start = os.clock()
|
|
|
|
local map = {}
|
|
|
|
for i = 1, 1000000 do
|
|
map[i] = i
|
|
end
|
|
|
|
local sum = 0
|
|
for i = 1, 1000000 do
|
|
sum = sum + map[i]
|
|
end
|
|
io.write(string.format("%d\n", sum))
|
|
|
|
for i = 1, 1000000 do
|
|
map[i] = nil
|
|
end
|
|
|
|
io.write(string.format("elapsed: %.8f\n", os.clock() - start))
|