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

Scheme Digest #8, Efficiency of Y



   Date: Tue, 15 Nov 88 10:26:46 EST
   From: kranz@wheaties.ai.mit.edu (David Kranz)

   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:

I tried a similar experiment in MIT Scheme (using + instead of *,
except a smaller loop to account for smaller fixnums), with the
following results:

    (factorial-loop 100) -> 1.03 msec

    (factorial-rec 100) -> 1.0 msec

    (factorial-lfp 100) -> 2.74 msec

Bill Rozas has expended no small effort in the MIT Scheme compiler to
make the Y combinator produce good results, and these timings are
evidence of that.  Still not perfect, but I believe Bill claims that
he can make the output code identical given a bit more work.