1 research outputs found

    Selective Tail Call Elimination

    No full text
    Tail calls are expected not to consume stack space in most functional languages. However, there is no support for tail calls in some environments. Even in such environments, proper tail calls can be implemented with a technique called a trampoline. To reduce the overhead of trampolining while preserving stack space asymptotically we propose selective tail call elimination based on an e#ect system. The e#ect system infers the number of successive tail calls generated by the execution of an expression, and trampolines are introduced only when they are necessary
    corecore