[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] LuaMacro 2 - a lexical macro preprocessor for Lua
- From: Krunal Rao <krunal.rao78@...>
- Date: Mon, 2 May 2011 14:04:46 +0100
On 2 May 2011 13:51, steve donovan <email@example.com> wrote:
> On Mon, May 2, 2011 at 2:38 PM, Krunal Rao <firstname.lastname@example.org> wrote:
>> Just curious, is there a specific reason why this would be much better than the
>> m[i][j] syntax which is achievable at the moment?
> In Francesco's experience, m[i][j] can be relatively expensive, since
> m[i] must return an indexable object. So it's an optimization concern.
Yes, but it's my understanding that he's working with LuaJIT.
My experience is that it's possible to create matrix classes via FFI
that do not
suffer from this issue (see my previous post).
Actually, even for tables (I tested only the case where they contained
entries) LuaJIT optimize away the temporary in my simple benchmarks using the