Module memchr::arch::all::packedpair

source ·
Expand description

Provides an architecture independent implementation of the “packed pair” algorithm.

The “packed pair” algorithm is based on the generic SIMD algorithm. The main difference is that it (by default) uses a background distribution of byte frequencies to heuristically select the pair of bytes to search for. Note that this module provides an architecture independent version that doesn’t do as good of a job keeping the search for candidates inside a SIMD hot path. It however can be good enough in many circumstances.

Structs

  • An architecture independent “packed pair” finder.
  • A pair of byte offsets into a needle to use as a predicate.

Traits

  • This trait allows the user to customize the heuristic used to determine the relative frequency of a given byte in the dataset being searched.