Skip to content

Commit d25e483

Browse files
author
Stjepan Glavina
committed
Link to an instability-bit-me story
1 parent 7d2e940 commit d25e483

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

text/0000-unstable-sort.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ of sort algorithms like higher performance or lower memory overhead are often mo
2020
desirable.
2121

2222
Having a performant, non-allocating unstable sort function in libcore would cover those
23-
needs. At the moment Rust is not offering a built-in alternative (only crates), which
23+
needs. At the moment Rust is not offering this solution as a built-in (only crates), which
2424
is unusual for a systems programming language.
2525

2626
**Q: What is stability?**<br>
@@ -54,6 +54,8 @@ A: Because stability is a good default. A programmer might call a sort function
5454
without checking in the documentation whether it is stable or unstable. It is very
5555
intuitive to assume stability, so having `slice::sort` perform unstable sorting might
5656
cause unpleasant surprises.
57+
See this [story](https://medium.com/@cocotutch/a-swift-sorting-problem-e0ebfc4e46d4#.yfvsgjozx)
58+
for an example.
5759

5860
**Q: Why does `slice::sort` allocate?**<br>
5961
A: It is possible to implement a non-allocating stable sort, but it would be

0 commit comments

Comments
 (0)