back in the day you could write a function that ends in a call to another function in the same module, and the compiler could optimize out the stack frame for that call
I don't think you can do that with metadata-rich managed code systems like Java or .NET