rayon-rs / rayon

Rayon: A data parallelism library for Rust
Apache License 2.0
11.02k stars 501 forks source link

par_select_nth methods #838

Open FlorianUekermann opened 3 years ago

FlorianUekermann commented 3 years ago

Similar to the set of par_sort slice methods, par_select_nth methods matching the respective (unstable) slice methods of the standard library would be extremely useful. See: https://doc.rust-lang.org/beta/std/primitive.slice.html#method.select_nth_unstable

cuviper commented 3 years ago

The current par_sort_unstable uses a sequential partitioning step, so it doesn't have any parallelism to lend to select-nth. IIRC it's possible to do a parallel partition, but we haven't implemented that.