[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: PiL3: typos
- From: Francisco Olarte <folarte@...>
- Date: Wed, 30 Oct 2013 19:35:53 +0100
On Tue, Oct 29, 2013 at 11:03 PM, Fidelis Assis <fidelis.assis@gmail.com> wrote:
> I may be missing something but can't see the difference: in tables of logs
> and trigonometric functions, long and expensive manual calculations were
> done once and the results stored so that when the same input was seen again
> the stored result could be used to speed up calculations.
No. First, you did not calculate the table, you bought it. When I had
to use them at exams I made sure I had them before even leaving home,
I did not compute a couple thousand pages of thightly packed numbers
at exam start. Second, in memoization you do not have nothing
remembered at program start, you rememeber things as you compute them.
Thing in some case it can make sense to memoize, say, md5 checksum of
received ethernet frames, but you'll need something bigger than the
universe to precompute and store every checksum before starting.
Francisco Olarte.