4 ms·
GCC at least has an annotation that can be used to tell the compiler that a function call never returns. I don't have the details, but I presume it causes the
by KMag 10y ago
GCC at least has an annotation that can be used to tell the compiler that a function call never returns. I don't have the details, but I presume it causes the compiler to omit any save/restore code, though I would guess that the return address is still pushed (x86 call instead of jmp) so that you get decent stack traces. 16-byte stack alignment across calls means that the average cost of pushing the return pointer is 8 bytes. It's not free, but it's cheap.