lua-users home
lua-l archive

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


On Tue, Oct 29, 2013 at 4:31 PM, Fidelis Assis <fidelis.assis@gmail.com> wrote:
> 2013/10/29 Dirk Laurie <dirk.laurie@gmail.com>
>>>
>>> "memoize" means to make a note of something you've just
>>>
>>> figured out, so that next time you can just consult your note
>>>
>>> instead of having to figure it out again.
>
>
>>
>> [...]
>
>
>>
>> Michie decided to coin a new word for this procedure, maybe
>> because he thought it was quite a neat little idea. Using "memoize"
>> in a somewhat similar situation is a way of tipping one's hat to
>> the inventor.
>>
>
> Isn't that procedure the same as in tables of logarithms and trigonometric
> functions? It is as old as at least ancient Greeks. Hipparchos didn't know
> whom he should tip his hat to but he used to "memoise" trigonometric
> functions :)
>
> --
> Fidelis Assis

I think that memoize means something fundamentally different, though.

If you told me that an algorithm "memorized a function", I would
assume that you meant that it stored it in a high-speed cache.

To memoize, to me, means to see some input, use some expensive and
long-running function, and then to store the output so that when the
same input is seen again, it can replace the function call with a
retrieve and copy function.

-Andrew