Demonstrate the benefits of memoization
Exhibit a program that you would expect to run much more slowly without memoization than with memoization. Also, consider the following interaction, where the
procedure is defined as in exercise
(define (square x) (* x x)) ;;; L-Eval input: (square (id 10)) ;;; L-Eval value: <response> ;;; L-Eval input: count ;;; L-Eval value: <response>
Give the responses both when the evaluator memoizes and when it does not.
There are no comments yet.
You must log in to post a comment.Login