lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jan 19, 2012 at 9:27 AM, Axel Kittenberger <axkibe@gmail.com> wrote:
> Compare
> a.b.c.d.e[#] = 1
> with
> a.b.c.d.e[a.b.c.d.e.length] = 1
>
> Where the former only walks to look up chain through once, to gain
> same performance with current lua, you need a temporary variable.

Or:

table.insert(a.b.c.d.e, 1)

Sam