BitArray can store 256 bits in 32 bytes plus overhead (pointer & length), which gives it better memory locality too (<= 2 locations in memory). Also, the actual count will be much less, probably at most around a dozen. This might not impact performance, but the AI is dumb & HashSet<byte> is clearly inefficient.
30 KiB
30 KiB