Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. 1. Any program that consumes some amount of stack, when coverted to CPS and
  2. run does not consume any stack space at all because all function calls inside
  3. the program are coverted to tail calls, passing through a continuation which is
  4. the work left to be done.
  5.  
  6. No, not every program should be coverted in CPS because even though we do not
  7. use the runtime stack space, a contination essentially creates its own run-time
  8. stack of functions left to do (i.e. the continuation may grow larger and larger)
  9. so it may not necessarily be as efficient as without continuations.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement