[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT 2 clone-on-write for tables
- From: Alexander Gladysh <agladysh@...>
- Date: Wed, 19 Jan 2011 21:53:44 +0300
On Wed, Jan 19, 2011 at 21:46, Tony Finch <email@example.com> wrote:
> On Wed, 19 Jan 2011, Alexander Gladysh wrote:
>> Another silly question, while we're on it: is it possible, in theory,
>> to create some magical "jit.tclone()" builtin, that would make such
>> clone-on-write optimization possible?
> You can do that with a proxy table. Point __index at the table to be
> cloned, and when __newindex is called, copy everything to the proxy.
Thank you. As I noted in my original post, I'm aware of that solution.
My question is about LJ2 optimizations.