[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Soliciting criticism of memoize function
- From: "Fidelis Assis" <fidelis@...>
- Date: Sat, 17 May 2008 00:59:58 -0300
On Thu, May 15, 2008 at 9:38 PM, Norman Ramsey <nr@eecs.harvard.edu> wrote:
> > I would move the metatable construction outside memoize because it
> > never changes.
>
> I understand the impulse, but since I'm already allocating a table at
> every call, I don't mind allocating a second table at every call.
>
> > You could also [use the __index metamethod instead of testing for nil]
>
> I like this idea; I hope my colleague will like it as well.
Yes, I like it too. Nice idea :-)
--
Fidelis Assis