2 ms·
There is no inherent difference. It's all memory. That said, as a sibling already pointed out, it's standard to control stack allocation with a single counter.
by marcosdumay 3y ago
There is no inherent difference. It's all memory.
That said, as a sibling already pointed out, it's standard to control stack allocation with a single counter. It's kind of standard to control heap allocation with an index and a lot of book-keeping.
But you are allowed to optimize the heap until there's no difference.