2 ms·
It is true that more swaps may be cheaper than fewer swaps. The operations to count, nowadays, are not swaps or comparisons, which are very cheap, but instead
by ncmncm 7y ago
It is true that more swaps may be cheaper than fewer swaps.
The operations to count, nowadays, are not swaps or comparisons, which are very cheap, but instead pipeline stalls, which are very, very expensive.
It is easy to better-than-double the speed of vanilla quicksort with a three-line change in the partition step.
- ncmncm 7y agoDetails https://news.ycombinator.com/item?id=23237663 https://news.ycombinator.com/item?id=23237663