4 ms·
The top of the stack should generally be already present in the cache, so stack memory would be faster than heap memory where objects aren’t necessary as close
by MobiusHorizons 4y ago
The top of the stack should generally be already present in the cache, so stack memory would be faster than heap memory where objects aren’t necessary as close together or accessed as frequently.