Crates.io | simd-itertools |
lib.rs | simd-itertools |
version | 0.2.3 |
source | src |
created_at | 2024-07-10 23:44:00.902654 |
updated_at | 2024-07-15 22:19:39.071096 |
description | SIMD-accelerated alternatives for common operations like contains, max, find etc. |
homepage | |
repository | https://github.com/LaihoE/SIMD-itertools |
max_upload_size | |
id | 1298908 |
size | 221,400 |
Change:
arr.iter().contains()
To:
arr.iter().contains_simd()
Currently the following are implemented:
find
filter
position
contains
eq
min/max
is_sorted
all_equal
And works for slice iterators of types: u8,u16,u32,u64,i8,i16,i32,i64,f32,f64,isize,usize
You can expect similar performance across the functions.
Requires nightly for now 😔:
rustup toolchain install nightly
rustup default nightly
// revert back to stable: rustup default stable
To get the best performance make sure you are compiling with -C target-cpu=native
For example:
RUSTFLAGS='-C target-cpu=native' cargo run