#iterator #simd #simd-accelerated #algorithm #operations #find #max

nightly simd-itertools

SIMD-accelerated alternatives for common operations like contains, max, find etc

6 releases

0.2.3 Jul 15, 2024
0.2.2 Jul 15, 2024
0.1.1 Jul 11, 2024

#398 in Concurrency

Download history 6/week @ 2024-07-29 94/week @ 2024-08-05 231/week @ 2024-08-12 181/week @ 2024-08-19 132/week @ 2024-08-26 186/week @ 2024-09-02 110/week @ 2024-09-09 56/week @ 2024-09-16 82/week @ 2024-09-23 72/week @ 2024-09-30 154/week @ 2024-10-07 64/week @ 2024-10-14 13/week @ 2024-10-21 27/week @ 2024-10-28 25/week @ 2024-11-04 15/week @ 2024-11-11

83 downloads per month
Used in candystore

MIT/Apache

155KB
1.5K SLoC

SIMD-accelerated iterators

crates.io

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

🔥🚀 Performance gain compared to the standard library 🚀🔥

Performance gain of compared to std implementation (u32) 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

Dependencies

~450KB