1 2 3 4 5 6 7 8 9 10 11 12
-- Table construction and traversal: stresses table array path and GC. -- Avoids # length operator for compatibility with incomplete -- implementations. local t = {} for i = 1, 100000 do t[i] = i end local s = 0 for i = 1, 100000 do s = s + t[i] end print(s)