I have two functions. Which is better and why?
tabIndexOverflow = function(seed, table)
for i = 1, #table do
if seed - table[i] <= 0 then
return i, seed
end
seed = seed - table[i]
end
end
tabIndexOverflow = function(seed, table)
for i, value in ipairs(table) do
if seed - value <= 0 then
return i, seed
end
seed = seed - value
end
end

2 comments
Source? Where does 200% come from?
https://springrts.com/wiki/Lua_Performance#TEST_9:_for-loops