4 ms·
Doesn't that mean in the end you have to check 127 values for if they are 0? Or 64, if you store numbers as 32-bit integers and compare them as 64-bit using a
by DarkWiiPlayer 8y ago
Doesn't that mean in the end you have to check 127 values for if they are 0?
Or 64, if you store numbers as 32-bit integers and compare them as 64-bit using a union type.
- karmakaze 8y agoYou could also keep a counter of the number of non-zero entries and update on zero/non-zero transitions.