in reply to Re^7: Bit vector fiddling with Inline C
in thread Bit vector fiddling with Inline C
- Why test the bit and then set it?
If you are only going to set the bit if it is unset, then just setting it achieves the same thing.
- Why would calling a function to set a bit be quicker than setting the bit directly?
I guess the compiler might inline the function and optimise away the overheads, but still I don't see why it would end up being any quicker. As quick possibly.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.