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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Wolfsort: An ultra-fast hybrid radix sort algorithm

102 点作者 scandum将近 5 年前

5 条评论

HippoBaro将近 5 年前
&gt; Historically software was always low on memory, and subsequently sorting algorithms were developed that bent over backwards in order to use as little additional memory as possible. Nowadays most modern systems have several gigabytes of memory that are not used and are just sitting idle.<p>True, but on these systems, most of the time, users don&#x27;t care about performance. And when they do, the dataset is not large enough for this kind of algorithms to shine anyway.
评论 #23947133 未加载
评论 #23948934 未加载
CyberDildonics将近 5 年前
&gt; Wolfsort requires 8 times the array size in swap memory for the O(n) partitioning process.<p>&gt; Wolfsort is primarily a proof of concept, currently it only properly supports unsigned 32 bit integers.<p>A lot of sorts can beat a generic sort on an array of numbers by gathering statistics, paying better attention to locality, implementation details like use of SIMD or some combination of those three.
评论 #23946585 未加载
dthul将近 5 年前
A bit OT: I very much appreciate well written C code for its simplicity and &quot;rawness&quot;, but how come that many C codebases seem to place no importance on code comments?<p>This repo contains a few thousand lines of code without so much as a single comment. In my experience that tends to happen much less in other languages. And it&#x27;s not like this C code is obvious.
评论 #23949016 未加载
评论 #23948435 未加载
shin_lao将近 5 年前
It seems to me that it&#x27;s using a strategy similar to SpreadSort, or am I wrong?<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Spreadsort" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Spreadsort</a>
评论 #23949115 未加载
usr1106将近 5 年前
&gt; Wolfsort is primarily a proof of concept, currently it only properly supports unsigned 32 bit integers.<p>Which makes it pretty useless outside of theoretical exercises(that is not saying that theoretical exercises would be useless). What would be a practical use case to sort integers? Well, the integers can be keys to some kind of records, but if your records remain unsorted accessing them is very expensive even if you have the sorted list of keys available.<p>Edit: Calculating the median is a practical case. Not sure how often that is needed in performance-critical contexts.
评论 #23947350 未加载
评论 #23947337 未加载