Crates.io | pmsa |
lib.rs | pmsa |
version | 0.1.0 |
source | src |
created_at | 2022-08-03 02:59:39.399966 |
updated_at | 2022-08-03 02:59:39.399966 |
description | Parallel Mergeing of two Sorted Arrays |
homepage | https://github.com/jerry73204/pmsa |
repository | https://github.com/jerry73204/pmsa.git |
max_upload_size | |
id | 637718 |
size | 23,783 |
It implements the Parallel Mergeing of two Sorted Arrays algorithm in Rust using rayon. The following functions are provided in this crate.
par_merge
par_merge_by
par_merge_by_key
To test the parallel algoirhtm against the sequential one,
cargo run --release --example benchmark -- 1000000
The benchmark runs the sequential and parallel versions on Intel
i7-10750H CPU (12 hyperthreads) using release profile. It is tested on
two sorted u64
arrays. The parallel version is shown to be ~6 times
fater than the sequential counterpart.
per array len | sequential | parallel |
---|---|---|
10^6 | 14.56987ms | 2.219912ms |
10^7 | 139.675856ms | 23.363867ms |
10^8 | 1.427501286s | 325.121204ms |
MIT license.