Update current implementation comments for select_nth_unstable

This commit is contained in:
Markus Everling 2023-05-26 01:28:41 +00:00
parent 0004b3b984
commit ea327915d8

View File

@ -3005,8 +3005,9 @@ pub fn sort_unstable_by_key<K, F>(&mut self, mut f: F)
/// ///
/// # Current implementation /// # Current implementation
/// ///
/// The current algorithm is based on the quickselect portion of the same quicksort algorithm /// The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also
/// used for [`sort_unstable`]. /// 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 /// [`sort_unstable`]: slice::sort_unstable
/// ///
@ -3056,8 +3057,9 @@ pub fn select_nth_unstable(&mut self, index: usize) -> (&mut [T], &mut T, &mut [
/// ///
/// # Current implementation /// # Current implementation
/// ///
/// The current algorithm is based on the quickselect portion of the same quicksort algorithm /// The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also
/// used for [`sort_unstable`]. /// 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 /// [`sort_unstable`]: slice::sort_unstable
/// ///