tenko
tenko copied to clipboard
Use `&~x` rather than `|x^x` to clear one or more bits
Kinda makes more sense although it probably doesn't matter much for performance.
const x = 33;
log(33 | 32 ^ 32);
log(33 & ~32);
I think it's faster if you 'shift' either left or right. It will improve perf if you are going to unset lots of bits.