Smoothsort Demystified (2011)
keithschwarz.com
Smoothsort Demystified (2011)
1–5 of 5 posts
Re: Smoothsort Demystified (2011)
#2I was curious to see its performance. I found this page that benchmarks Keith's implementation with an implementation of std::sort and timsort.
In that test, it was thoroughly beaten in all benchmarks. The issue seems to be that it isn't cache friendly.
https://www.gamasutra.com/view/news/172542/Indepth_Smoothsor...
Re: Smoothsort Demystified (2011)
#3Awesome article. This is what I want to see in HN every day, very interesting and relatively unknown CS topic, well explained, easy to understand, well written code. Basically flawless. Unfortunately, HeapSort and its variants aren't that popular any more since they're not cache friendly. To see that, observe that in the article author maintains bunch of heaps in the array and even though it's asymptotically fast and in-place, you'll have to keep referring to distant parts of the array, causing cache misses.
Re: Smoothsort Demystified (2011)
#4As the author notes, Dijkstra's paper is a bit of a challenge, but it's well worth reading: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD07xx/E.... It's a great example of deriving an algorithm from a predicated acceptance state.
Re: Smoothsort Demystified (2011)
#5[deleted]