File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1302,11 +1302,9 @@ impl<T> [T] {
1302
1302
1303
1303
/// Sorts the slice with a key extraction function.
1304
1304
///
1305
- /// This sort is stable (i.e. does not reorder equal elements) and `O(n log n)` worst-case.
1306
- ///
1307
- /// When applicable, unstable sorting is preferred because it is generally faster than stable
1308
- /// sorting and it doesn't allocate auxiliary memory.
1309
- /// See [`sort_unstable_by_key`](#method.sort_unstable_by_key).
1305
+ /// During sorting, the key function is called only once per element.
1306
+ /// This sort is stable (i.e. does not reorder equal elements) and `O(m n + n log n)`
1307
+ /// worst-case, where the key function is `O(m)`.
1310
1308
///
1311
1309
/// # Current implementation
1312
1310
///
@@ -1315,8 +1313,7 @@ impl<T> [T] {
1315
1313
/// It is designed to be very fast in cases where the slice is nearly sorted, or consists of
1316
1314
/// two or more sorted sequences concatenated one after another.
1317
1315
///
1318
- /// Also, it allocates temporary storage half the size of `self`, but for short slices a
1319
- /// non-allocating insertion sort is used instead.
1316
+ /// The algorithm allocates temporary storage the size of `self`.
1320
1317
///
1321
1318
/// # Examples
1322
1319
///
You can’t perform that action at this time.
0 commit comments