3 ms·
> the cost of calling an empty function can be as high as 14 cycles of overhead per function call How do you figure? Call and ret should be just a couple of c
by moonchild 4y ago
> the cost of calling an empty function can be as high as 14 cycles of overhead per function call
How do you figure? Call and ret should be just a couple of cycles each. And they run in parallel, so if you were waiting for a memory access or otherwise didn't have anything better to do, the overhead is even less.
- mark_undoio 4y agoMaybe counting the need to save/restore caller saved registers if they are in used + needed after the call?
- moonchild 4y agoIt is called in the prologue; no caller-saved registers have been used yet, so there is no need to save them.