local a = {}
local last_time = os.clock()
for i = 1, 2e6 do
local s = ("%016d"):format(i):gsub(".","%0_")
a[i] = s
if i % 10000 == 0 then
local time = os.clock()
io.write(("%d %.2fs (total %.2fs)\n"):format(i, time - last_time, time))
io.flush()
last_time = time
end
end
It takes longer and longer to add another 10000 strings.