Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



Maybe counting the need to save/restore caller saved registers if they are in used + needed after the call?


It is called in the prologue; no caller-saved registers have been used yet, so there is no need to save them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: