diff options
| author | Markus Everling <markuseverling@gmail.com> | 2023-05-26 01:28:41 +0000 |
|---|---|---|
| committer | Markus Everling <markuseverling@gmail.com> | 2023-05-26 01:31:04 +0000 |
| commit | ea327915d8d2311b03e50c12fd2e9e6aa86f0077 (patch) | |
| tree | aedf44c2bfe658990d68d80964033e2289e2eb04 | |
| parent | 0004b3b984b19646c1f78b09ba497b7bd6e882c1 (diff) | |
| download | rust-ea327915d8d2311b03e50c12fd2e9e6aa86f0077.tar.gz rust-ea327915d8d2311b03e50c12fd2e9e6aa86f0077.zip | |
Update current implementation comments for `select_nth_unstable`
| -rw-r--r-- | library/core/src/slice/mod.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index bd1b16e8d73..1f195555229 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -3005,8 +3005,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 /// @@ -3056,8 +3057,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 /// |
