lua-users home
lua-l archive

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


Hi:

> Isn't that procedure the same as in tables of logarithms and trigonometric
> functions?

Whow, I did USE those, although they were dissapearing.

> 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 :)

Sounds similar but it's not exactly the same. Before calculators where
readilly available calculating a trig could be done, but was painful.
Even using a non-trig calculator as an aid it took a while, so
specialist, or people with access to more resources, built every value
once, printed and sold the tables. This is similar to the way lookup
tables are used to code/decode G711 or to build CRC one byte/word per
step, or how precompiled trig tables where routinely used in 8/16 bits
games  ( you build the table at compile/build time where more
resources, in this case time and some time better CPUs are available
and use copy the result ). Memoization just avoids repeated
calculations, and can be done when the problem space is too big too
precompute, is more similar to a non-discarding read cache on a DVD,
you remeber the result of the stable funcion read(sector number),
because you know it's expensive to compute and does not change.

Also, 'memorize' is a human process, where you make an effort to try
to insure you remember something. It's not like computers, which
remember everything until they explicitly ( by overwriting ) discard
them ( things like returning from a funciton explictly overwrite the
stack pointer, which is part of the info memorized to locate a value
on stack, a properly functioning computer never forgets things ).

Francisco Olarte.