[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Scheme Digest #8 , Efficiency of Y
- To: Scheme@mc.lcs.mit.edu
- Subject: Scheme Digest #8 , Efficiency of Y
- From: kranz@wheaties.ai.mit.edu (David Kranz)
- Date: Tue ,15 Nov 88 11:26:46 EDT
- In-reply-to: Automatic Scheme Digestifier's message of 15 NOV 88 00:10:57 EST <8811150617.AA29565@wheaties.ai.mit.edu>
Edward Wang is correct that the time in the example is dominated by bignum
arithmetic. I changed the * in factorial to + and got the following result in
T3.1:
(factorial-loop 20000) -> .1 sec
(factorial-rec 20000) -> .22 sec
(factorial-lfp 20000) -> 1.32 sec
With *:
(factorial-rec 100) -> .42 sec
(factorial-rec 1000) -> 57.78 sec