[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: t[] = 'syntactic sugar'
- From: Sam Roberts <vieuxtech@...>
- Date: Thu, 19 Jan 2012 11:25:26 -0800
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