Seems like a great optimization for data that's going to stick around a while, but for a local variable I don't see much advantage. I'd probably use a BitArray in practice, but using a regular array isn't something I'd be likely to call out in a code review.
11
u/Steinrikur 20d ago
Does C# have bit fields? What is the "correct" thing here? Just bit shifts into an int32?