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

Afaik runtime linkers can't convert a function call into a single non-call instruction.


Linux kernel has an interesting optimization using the ALTERNATIVE macro, where you can directly specify one of two instructions and it will be patched at runtime depending on cpu flags. No function calls needed (although you can have a function call as one of the instructions). It's a bit more messy in userspace where you have to respect platform page flags, etc. but it should be possible.




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

Search: