[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
No need to optimize tail recursion, use infinite virtual stack!
- To: COMMON-LISP@SU-AI
- Subject: No need to optimize tail recursion, use infinite virtual stack!
- From: Rem@IMSSS
- Date: Fri, 18 Jul 1986 18:10:00 -0000
If a finite segment of stack is in real memory, but upon overflowing the
stack the old part of it is swapped out to disk and the upper part in
memory bubbled down to make new room, an effectively infinite stack can
be emulated. With tail recursion emulating iteration, there is one big
sweep of gobbling up more and more virtual stack, followed by one
quick unwind of all that stack, thus very little thrashing, thus not
too inefficient. When bubbling the stack, stack frames have to be updated,
or else must reference virtual stack locations at the outset, but there
seem to be no major problems. Has any implementation of any LISP whatsoever
tried virtual infinite stacks?