You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dominoes, saddle-points: sort_unstable instead of sort (#1002)
clippy:
warning: Use sort_unstable instead of sort
note: `#[warn(clippy::stable_sort_primitive)]` on by default
help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#stable_sort_primitive
When sorting primitive values (integers, bools, chars, as well as
arrays, slices, and tuples of such items), it is better to use an
unstable sort than a stable sort.
Using a stable sort consumes more memory and cpu cycles. Because values
which compare equal are identical, preserving their relative order (the
guarantee that a stable sort provides) means nothing, while the extra
costs still apply.
0 commit comments