4 ms·
Anyone knows how this compares to Timsort in practice? A quick google turns out nothing
by beagle3 9y ago
Anyone knows how this compares to Timsort in practice?
A quick google turns out nothing
- mastax 9y agohttps://github.com/rust-lang/rust/pull/40601 https://github.com/rust-lang/rust/pull/40601 "stable" is a simplified Timsort: https://github.com/rust-lang/rust/pull/38192 https://github.com/rust-lang/rust/pull/38192 "unstable" is a pdqsort
- stjepang 9y agoTo summarize: If comparison is cheap (e.g. when sorting integers), pdqsort wins because it copies less data around and the instructions are less data-dependency-heavy. If comparison is expensive (e.g. when sorting strings), timsort is usually a tiny bit faster (around 5% or less) because it performs a slightly smaller total number of comparisons.