Skip to content

Instantly share code, notes, and snippets.

@linasm
Created January 17, 2020 13:04
Show Gist options
  • Save linasm/2c663337146359ec11b2c9600b97b632 to your computer and use it in GitHub Desktop.
Save linasm/2c663337146359ec11b2c9600b97b632 to your computer and use it in GitHub Desktop.
Success bit mask precomputing for Shifting Bit Mask string search algorithm
def computeSuccessBitMask(needle: Array[Byte]): Long = {
1L << (needle.length - 1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment