Skip to content

Commit

Permalink
Auto merge of #107191 - Voultapher:reverse-timsort-scan-direction, r=…
Browse files Browse the repository at this point in the history
…thomcc

Reverse Timsort scan direction

Another PR in the series of stable sort improvements. Best reviewed by looking at the individual commits.

The main perf gain here is for fully ascending (sorted) or reversed inputs for cheap to compare types such as `u64`, these see a ~1.5x speedup.

![timsort_evo2_hot_u64_10k](https://user-images.githubusercontent.com/6864584/213913351-cfdf452f-a37c-4bc6-a811-d10c60e66eca.png)

![timsort_evo2_hot_string_10k](https://user-images.githubusercontent.com/6864584/213913354-d9cc395a-2b48-4f54-b687-09174b9e35ce.png)

Types such as string with indirect pre-fetching see only minor changes. Further speedups are planned in future PRs so, I wouldn't spend too much time for benchmarks here.
  • Loading branch information
bors committed Feb 13, 2023
2 parents 7740f9a + 5eff264 commit 96834f0
Showing 1 changed file with 271 additions and 220 deletions.
Loading

0 comments on commit 96834f0

Please sign in to comment.