On Jun 3, 2009, at 8:24 PM, Abdulaziz Ghuloum wrote:

Another point is that having an unbounded stack also changes the space
complexity of some programs.  For a contrived example:

(define (f n ls)
  (if (zero? n)
      0
      (+ (f (- n 1) (append ls '(1))) 1)))

(f N '()) will run in O(N^2) space instead of O(N) space if the
debugger preserves all N lists.

Interesting that my debugger is already leaking somewhere for this
example!  Urghhh!

Aziz,,,

Reply via email to