[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Benchmark] Numeric for loop vs. ipairs()
- From: David Manura <dm.lua@...>
- Date: Wed, 6 May 2009 20:15:40 -0400
On Wed, May 6, 2009 at 5:14 PM, Alexander Gladysh wrote:
> Today I'm benchmarking iterating a table with ipairs vs. numeric for:...
> for i = 1, #t do
> if v == nil then
> break
> end
> end
> end
> ...
> 7 [35] GETGLOBAL 5 -2 ; v
What's v? Normally, the equivalent numeric loop would loop like
for i = 1, #t do
local v = t[i]
end