sliceslice

Actions Crate Docs License

A fast implementation of single-pattern substring search using SIMD acceleration, based on the work presented by Wojciech Muła. For a fast multi-pattern substring search algorithm, see instead the aho-corasick crate.

Example

```rust use sliceslice::x86::DynamicAvx2Searcher;

fn main() { let searcher = unsafe { DynamicAvx2Searcher::new(b"ipsum".to_owned().into()) };

assert!(unsafe {
    searcher.search_in(b"Lorem ipsum dolor sit amet, consectetur adipiscing elit")
});

assert!(!unsafe {
    searcher.search_in(b"foo bar baz qux quux quuz corge grault garply waldo fred")
});

} ```

Licensing

Licensed under the MIT license. See the LICENSE file for details.