4 ms·
But without TCO, even if your function doesn't have any state of it's own, it will use memory on the call stack. I don't think anything about what they said imp
by fyrn_ 3y ago
But without TCO, even if your function doesn't have any state of it's own, it will use memory on the call stack. I don't think anything about what they said implied memory segmentation was the problem.
It's pretty clear they mean each recusion increases the size of the call stack without TCO.
- rezonant 3y agoAgreed, I think the mention of heap space was more to answer the question of someone new to this topic of "but wait, I can allocate gigabytes of data in an array, why can't I allocate 100,000 stack frames?"