When using the stack, the only thing you should worry is the overflow, if you’re storing huge objects as local variables. Performance is not an issue here. The stack is a safe place and using global vars instead of local vars hurts code maintainability.