Remix.run Logo
lstodd 5 hours ago

It becames super slow when you bump that pointer into a page that's missing from the TLB.

HarHarVeryFunny 5 hours ago | parent [-]

A TLB miss could happen when executing the next statement in your program. It's not something you have a lot of control over, and doesn't change the fact that allocating from the stack (when an option) is going to be faster than allocating from the heap.

lstodd 4 hours ago | parent [-]

So you don't allocate left and right, be it stack or heap.

It's all useless though unless you control the hardware. If you don't, you might as well prlimit --stack=unlimited and have at it.