Crate pmsa

Crate pmsa 

Source
Expand description

Parallel Mergeing of two Sorted Arrays using rayon.

This crate provides the highly parallelized algorithm to merge two sorted slices in the following functions.

§Benchmark Results

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 lensequentialparallel
10^614.56987ms2.219912ms
10^7139.675856ms23.363867ms
10^81.427501286s325.121204ms

Functions§

par_merge
Merges two sorted slices in parallel.
par_merge_by
Merges two sorted slices in parallel with a custom comparison function.
par_merge_by_key
Merges two sorted slices in parallel with a custom key function.
seq_merge
Sequentially merges two sorted slices.
seq_merge_by
Sequentially merges two sorted slices with a custom comparison function.
seq_merge_by_key
Sequentially merges two sorted slices with a custom key function.