Comment by astrange

5 years ago

If you really care about performance there’s no particular reason the whole stack has to be set up at function beginning/end. Compilers are not flexible enough about this, or other things like how they won’t store values in the frame pointer register on i386.

I believe the optimization to do this is called “shrink-wrapping”.