3 ms·
And there are also languages without GC where the CPS technique can lead to immediate reclaiming of the state on drop.
by ithkuil 5y ago
And there are also languages without GC where the CPS technique can lead to immediate reclaiming of the state on drop.
- cryptonector 5y agoI've written hand-coded CPS in C, but I take your point. The issue is that while every function exits via tail-calls, so the stack footprint is small, every continuation is a closure that has to be allocated somewhere, and that somewhere is generally going to have to be the heap.