How to keep unreachable code?
- by Gabriel
I'd like to write a function that would have some optional code to execute or not depending on user settings. The function is cpu-intensive and having ifs in it would be slow since the branch predictor is not that good.
My idea is making a copy in memory of the function and replace NOPs with jumps when I don't want to execute some code. My working…