3 ms·
Stack is usually faster to use since it's always sequential in nature which is related to why it's considered finite while heap can theoretically take all of OS
by jimbo_joe 3y ago
Stack is usually faster to use since it's always sequential in nature which is related to why it's considered finite while heap can theoretically take all of OS' available memory. This way the user doesn't have to consider maximum stack depth prior to running the app
- quotemstr 3y ago> Stack is usually faster to use since it's always sequential in nature You can use an arena allocator to get linear allocation on the heap too. Arena allocation is underused IMHO.