Open bgdncz opened 9 years ago
For 15 or more set bits, use memchr to find 0xFF bytes within storage. Once you found one, inspect the previous byte and the next one. In general, processing chunk by chunk is probably the second best option.
@pczarn Well, 15 was an example, what if I need to find 5 unset bits?
Hi! I don't know the relevance of this issue regarding
BitVec
s in particular, but is there a way to efficiently find a sequence of (un)set bits with a precise length? Ex: 15 set bits (and return the location of the first one)