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

How often is this doing work that the compiler is going to do for you anyway?


I'm not sure I understand the question. The first one about detecting if x is odd or even is usually what the compiler will optimize the more common (x%2) == 0 to.

Other than that, these are things that you have to do yourself. You can't call compiler.setMySeventhBit();

If you need to be able to flip and check bits, you have to do it yourself.




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

Search: