Each time a function is called, the code for the function, as well as space for function arguments and return values, is pushed onto the top of the call stack. When the function finishes execution, ...
Stack memory is dominated by function call overhead (return addresses, saved registers), not data size or boxing approach. Modern compilers optimize away most theoretical differences.
This Q&A is part of a weekly series of posts highlighting common questions encountered by technophiles and answered by users at Stack Exchange, a free, community-powered network of 100+ Q&A sites.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results