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

Scheme Digest #8 , Efficiency of Y



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