Skip to content

Instantly share code, notes, and snippets.

@linasm
Created January 17, 2020 13:04
Show Gist options
  • Select an option

  • Save linasm/2c663337146359ec11b2c9600b97b632 to your computer and use it in GitHub Desktop.

Select an option

Save linasm/2c663337146359ec11b2c9600b97b632 to your computer and use it in GitHub Desktop.

Revisions

  1. linasm created this gist Jan 17, 2020.
    3 changes: 3 additions & 0 deletions ShiftingBitMasksPrecompute2.scala
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    def computeSuccessBitMask(needle: Array[Byte]): Long = {
    1L << (needle.length - 1)
    }