diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-05-29 04:03:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-29 04:03:03 +0200 |
| commit | e71b3b3cfac1ea515bc3cf2a6495f9261f265f43 (patch) | |
| tree | 5136df958041afe21eb12bbc49913ca4c572aac7 | |
| parent | 760d46ed06f3c8cc471a2a9480291740930d1bd5 (diff) | |
| parent | 448a38838771bfde7294a44e9f239c787fb516c5 (diff) | |
| download | rust-e71b3b3cfac1ea515bc3cf2a6495f9261f265f43.tar.gz rust-e71b3b3cfac1ea515bc3cf2a6495f9261f265f43.zip | |
Rollup merge of #112045 - Sp00ph:update_current_impl, r=Amanieu
Followup to #111973 I somehow forgot to update the comment on `select_nth_unstable_by_key` in #111973, so this PR fixes that. r? `@Amanieu`
| -rw-r--r-- | library/core/src/slice/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 1f195555229..62003ddf515 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -3113,8 +3113,9 @@ impl<T> [T] { /// /// # Current implementation /// - /// The current algorithm is based on the quickselect portion of the same quicksort algorithm - /// used for [`sort_unstable`]. + /// The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also + /// the basis for [`sort_unstable`]. The fallback algorithm is Median of Medians using Tukey's Ninther for + /// pivot selection, which guarantees linear runtime for all inputs. /// /// [`sort_unstable`]: slice::sort_unstable /// |
