Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 734 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 734 Bytes

vqsort-rs

Rust bindings for the Google Highway vectorized quicksort.

The vectorized quicksort sorting algorithm is very fast, as seen in a writeup, and 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, this crate resorts to sort_unstable, because Miri doesn't support FFI.