Commit 36af639
committed
Replace sort implementations
- `slice::sort` -> driftsort
https://github.com/Voultapher/sort-research-rs/blob/main/writeup/driftsort_introduction/text.md
- `slice::sort_unstable` -> ipnsort
https://github.com/Voultapher/sort-research-rs/blob/main/writeup/ipnsort_introduction/text.md
Replaces the sort implementations with tailor made ones that strike a
balance of run-time, compile-time and binary-size, yielding run-time and
compile-time improvements. Regressing binary-size for `slice::sort`
while improving it for `slice::sort_unstable`. All while upholding the
existing soft and hard safety guarantees, and even extending the soft
guarantees, detecting strict weak ordering violations with a high chance
and reporting it to users via a panic.
In addition the implementation of `select_nth_unstable` is also adapted
as it uses `slice::sort_unstable` internals.1 parent 4313a19 commit 36af639
File tree
18 files changed
+2618
-1685
lines changed- alloc/src
- slice
- core
- src/slice
- sort
- stable
- unstable
- tests
18 files changed
+2618
-1685
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
| 200 | + | |
202 | 201 | | |
203 | 202 | | |
204 | 203 | | |
| |||
294 | 293 | | |
295 | 294 | | |
296 | 295 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
301 | 299 | | |
302 | 300 | | |
303 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
304 | 308 | | |
305 | | - | |
| 309 | + | |
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
| |||
Large diffs are not rendered by default.
0 commit comments