3 ms·
> Not clear that this would speed things up much today. It would likely slow things down, actually. One advantage that a stack has is that the stack memory is
by bsder 1y ago
> Not clear that this would speed things up much today.
It would likely slow things down, actually.
One advantage that a stack has is that the stack memory is "hot"--it is very likely in cache due to the fact that it is all right next to one another and used over and over and over. Statically allocated memory, by contrast, has no such guarantee and every function call is likely to be "cold" and need to pull in the cache line with its static variables.