lua-users home
lua-l archive

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


On 8 June 2015 at 18:09, Soni L. <fakedme@gmail.com> wrote:
>
>
> On 08/06/15 06:05 PM, Soni L. wrote:
>
> I wish you could access your own locals with an _LOCAL[idx] that would be
> faster than debug.getlocal...
>
> Not sure how that'd work if you local x = _LOCAL, or called a function with
> _LOCAL...
>
> Actually I do know, _LOCAL tables would be like any other tables, but
> heavily optimized for this kind of stuff, and it'd be part of the function's
> call stack entry thingy. The GC can take care of the rest.

Come up with a proof-of-concept implementation (including of course
tests to show it's correct and benchmarks to show that your heavy
optimizations are worth it), and then I'm sure the Lua authors will
give it due consideration. :)

-- Hisham