vqsort-rs

Crates.iovqsort-rs
lib.rsvqsort-rs
version0.2.0
sourcesrc
created_at2024-05-21 19:50:19.436526
updated_at2024-05-22 16:37:17.583834
descriptionRust bindings for the Google Highway's vectorized quicksort
homepage
repositoryhttps://github.com/lincot/vqsort-rs
max_upload_size
id1247161
size23,927
(lincot)

documentation

README

vqsort-rs

Rust bindings for the Google Highway's vectorized quicksort.

The sorting algorithm is very fast as seen in a research and far outperforms the standard Rust sort_unstable. However, it can only be used with primitive integers and floats.

Example

let mut data = [5, 3, 8, 0, -100];
vqsort_rs::sort(&mut data);
assert_eq!(data, [-100, 0, 3, 5, 8]);

vqsort_rs::sort_descending(&mut data);
assert_eq!(data, [8, 5, 3, 0, -100]);

Miri

When testing with Miri, the crate resorts to sort_unstable, since Miri doesn't support FFI.

Commit count: 10

cargo fmt