Structs§
- Pre πA combination of prefilter effectiveness state and the prefilter itself.
- Prefilter πThe implementation of a prefilter.
- Prefilter
State πPrefilterState tracks state associated with the effectiveness of a prefilter. It is used to track how many bytes, on average, are skipped by the prefilter. If this average dips below a certain threshold over time, then the state renders the prefilter inert and stops using it. - Searcher πA βmetaβ substring searcher.
- Searcher
Rev πA reverse substring searcher. - TwoWay
With πPrefilter A two-way substring searcher with a prefilter.
Enums§
- Prefilter controls whether heuristics are used to accelerate searching.
- Searcher
RevKind πThe kind of the reverse searcher.
Functions§
- do_
packed_ πsearch Returns true if the needle has the right characteristics for a vector algorithm to handle the entirety of substring search. - prefilter_
kind_ π βavx2 Reads from theavx2
field ofPrefilterKind
to execute the x86_64 AVX2 prefilter. - prefilter_
kind_ π βfallback Reads from thefallback
field ofPrefilterKind
to execute the fallback prefilter. Works on all platforms. - prefilter_
kind_ π βsse2 Reads from thesse2
field ofPrefilterKind
to execute the x86_64 SSE2 prefilter. - searcher_
kind_ π βavx2 Reads from theavx2
field ofSearcherKind
to execute the x86_64 AVX2 vectorized substring search implementation. - searcher_
kind_ π βempty Reads from theempty
field ofSearcherKind
to handle the case of searching for the empty needle. Works on all platforms. - searcher_
kind_ π βone_ byte Reads from theone_byte
field ofSearcherKind
to handle the case of searching for a single byte needle. Works on all platforms. - searcher_
kind_ π βsse2 Reads from thesse2
field ofSearcherKind
to execute the x86_64 SSE2 vectorized substring search implementation. - searcher_
kind_ π βtwo_ way Reads from thetwo_way
field ofSearcherKind
to handle the case of searching for an arbitrary needle without prefilter acceleration. Works on all platforms. - Reads from the
two_way_with_prefilter
field ofSearcherKind
to handle the case of searching for an arbitrary needle with prefilter acceleration. Works on all platforms.
Type Aliases§
- Prefilter
Kind πFn The type of a prefilter function. - Searcher
Kind πFn The type of a substring search function.
Unions§
- Prefilter
Kind πA union indicating one of several possible prefilters that are in active use. - Searcher
Kind πA union indicating one of several possible substring search implementations that are in active use.