diff options
| author | varkor <github@varkor.com> | 2018-03-17 20:43:46 +0000 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-03-18 12:50:56 +0000 |
| commit | 9896b38f01c068abfe7170cb9ae2bfadb4aebbc4 (patch) | |
| tree | 4191dccd0cd9913de4c56383c4268fe6f38c9046 /src/liballoc/slice.rs | |
| parent | ca3bed0c66d27fbf30eb48ae3eb5af235669364d (diff) | |
| download | rust-9896b38f01c068abfe7170cb9ae2bfadb4aebbc4.tar.gz rust-9896b38f01c068abfe7170cb9ae2bfadb4aebbc4.zip | |
Clarify time complexity
Diffstat (limited to 'src/liballoc/slice.rs')
| -rw-r--r-- | src/liballoc/slice.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index bef50a733cc..cd212aa15ba 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -1303,7 +1303,7 @@ impl<T> [T] { /// Sorts the slice with a key extraction function. /// - /// This sort is stable (i.e. does not reorder equal elements) and `O(m n log m n)` + /// This sort is stable (i.e. does not reorder equal elements) and `O(m n log(m n))` /// worst-case, where the key function is `O(m)`. /// /// For expensive key functions (e.g. functions that are not simple property accesses or @@ -1365,6 +1365,7 @@ impl<T> [T] { /// # Examples /// /// ``` + /// #![feature(slice_sort_by_cached_key)] /// let mut v = [-5i32, 4, 32, -3, 2]; /// /// v.sort_by_cached_key(|k| k.to_string()); @@ -1480,7 +1481,7 @@ impl<T> [T] { /// elements. /// /// This sort is unstable (i.e. may reorder equal elements), in-place (i.e. does not allocate), - /// and `O(m n log m n)` worst-case, where the key function is `O(m)`. + /// and `O(m n log(m n))` worst-case, where the key function is `O(m)`. /// /// # Current implementation /// |
