Crates.io | vqsort-rs |
lib.rs | vqsort-rs |
version | 0.2.0 |
source | src |
created_at | 2024-05-21 19:50:19.436526 |
updated_at | 2024-05-22 16:37:17.583834 |
description | Rust bindings for the Google Highway's vectorized quicksort |
homepage | |
repository | https://github.com/lincot/vqsort-rs |
max_upload_size | |
id | 1247161 |
size | 23,927 |
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.
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]);
When testing with Miri, the crate resorts to sort_unstable, since Miri doesn't support FFI.