[−][src]Enum sliceslice::x86::DynamicAvx2Searcher
Single-substring searcher based on Avx2Searcher
but with dynamic algorithm
selection.
It has specialized cases for zero-length needles, which are found in all
haystacks, and one-length needles, which uses MemchrSearcher
. For needles
up to a length of thirteen it uses specialized versions of Avx2Searcher
,
finally falling back to the generic version of Avx2Searcher
for longer
needles.
Variants
Specialization for needles with length 0.
N1(MemchrSearcher)
Specialization for needles with length 1.
N2(Avx2Searcher2)
Specialization for needles with length 2.
N3(Avx2Searcher3)
Specialization for needles with length 3.
N4(Avx2Searcher4)
Specialization for needles with length 4.
N5(Avx2Searcher5)
Specialization for needles with length 5.
N6(Avx2Searcher6)
Specialization for needles with length 6.
N7(Avx2Searcher7)
Specialization for needles with length 7.
N8(Avx2Searcher8)
Specialization for needles with length 8.
N9(Avx2Searcher9)
Specialization for needles with length 9.
N10(Avx2Searcher10)
Specialization for needles with length 10.
N11(Avx2Searcher11)
Specialization for needles with length 11.
N12(Avx2Searcher12)
Specialization for needles with length 12.
N13(Avx2Searcher13)
Specialization for needles with length 13.
N(Avx2Searcher)
Fallback implementation for needles of any size.
Implementations
impl DynamicAvx2Searcher
[src]
pub unsafe fn new(needle: Box<[u8]>) -> Self
[src]
avx2
only.Creates a new searcher for needle
. By default, position
is set to
the last character in the needle.
pub unsafe fn with_position(needle: Box<[u8]>, position: usize) -> Self
[src]
avx2
only.Same as new
but allows additionally specifying the position
to use.
pub unsafe fn inlined_search_in(&self, haystack: &[u8]) -> bool
[src]
avx2
only.Inlined version of search_in
for hot call sites.
pub unsafe fn search_in(&self, haystack: &[u8]) -> bool
[src]
avx2
only.Performs a substring search for the needle
within haystack
.
Auto Trait Implementations
impl RefUnwindSafe for DynamicAvx2Searcher
impl Send for DynamicAvx2Searcher
impl Sync for DynamicAvx2Searcher
impl Unpin for DynamicAvx2Searcher
impl UnwindSafe for DynamicAvx2Searcher
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,