brettwooldridge / SparseBitSet

An efficient sparse bit set implementation for Java
Apache License 2.0
265 stars 33 forks source link

[#15] previousSetBit resets word length after miss #16

Closed BrentDouglas closed 5 years ago

BrentDouglas commented 5 years ago

Currently it sets the length to the position of the needle in the first word it looks up and only searches indices below that. This is incorrect after the initial word where we need to search from the top.