Find
C
ase-sensitive
R
egexp search
Path
comm-central
/
third_party
/
rust
/
memchr
/
src
/
arch
/
aarch64
/
neon
Navigation
Enable keyboard shortcuts
Name
Description
Size
memchr.rs
! This module defines 128-bit vector implementations of `memchr` and friends. The main types in this module are [`One`], [`Two`] and [`Three`]. They are for searching for one, two or three distinct bytes, respectively, in a haystack. Each type also has corresponding double ended iterators. These searchers are typically much faster than scalar routines accomplishing the same task. The `One` searcher also provides a [`One::count`] routine for efficiently counting the number of times a single byte occurs in a haystack. This is useful, for example, for counting the number of lines in a haystack. This routine exists because it is usually faster, especially with a high match count, then using [`One::find`] repeatedly. ([`OneIter`] specializes its `Iterator::count` implementation to use this routine.) Only one, two and three bytes are supported because three bytes is about the point where one sees diminishing returns. Beyond this point and it's probably (but not necessarily) better to just use a simple `[bool; 256]` array or similar. However, it depends mightily on the specific work-load and the expected match frequency.
37977
mod.rs
! Algorithms for the `aarch64` target using 128-bit vectors via NEON.
112
packedpair.rs
! A 128-bit vector implementation of the "packed pair" SIMD 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. [generic SIMD]: http://0x80.pl/articles/simd-strfind.html#first-and-last
8285