News for hackers. Stuff that matters.
Re:The Absurdity Of Stacks by jimbo_joe on Sunday May 21, 2023 @07:04AM (#36019709)
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
Re:The Absurdity Of Stacks by quotemstr on Sunday May 21, 2023 @08:14AM (#36020110)
> 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.