TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Smoothsort Demystified (2011)

97 点作者 csdrane超过 6 年前

3 条评论

vinkelhake超过 6 年前
I was curious to see its performance. I found this page that benchmarks Keith&#x27;s implementation with an implementation of std::sort and timsort.<p>In that test, it was thoroughly beaten in all benchmarks. The issue seems to be that it isn&#x27;t cache friendly.<p><a href="https:&#x2F;&#x2F;www.gamasutra.com&#x2F;view&#x2F;news&#x2F;172542&#x2F;Indepth_Smoothsort_vs_Timsort.php" rel="nofollow">https:&#x2F;&#x2F;www.gamasutra.com&#x2F;view&#x2F;news&#x2F;172542&#x2F;Indepth_Smoothsor...</a>
gnulinux超过 6 年前
Awesome 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&#x27;t that popular any more since they&#x27;re not cache friendly. To see that, observe that in the article author maintains bunch of heaps in the array and even though it&#x27;s asymptotically fast and in-place, you&#x27;ll have to keep referring to distant parts of the array, causing cache misses.
User23超过 6 年前
As the author notes, Dijkstra&#x27;s paper is a bit of a challenge, but it&#x27;s well worth reading: <a href="https:&#x2F;&#x2F;www.cs.utexas.edu&#x2F;users&#x2F;EWD&#x2F;transcriptions&#x2F;EWD07xx&#x2F;EWD796a.html" rel="nofollow">https:&#x2F;&#x2F;www.cs.utexas.edu&#x2F;users&#x2F;EWD&#x2F;transcriptions&#x2F;EWD07xx&#x2F;E...</a>. It&#x27;s a great example of deriving an algorithm from a predicated acceptance state.