arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2012.00866cs.DS
收藏

赫斯基索尔特

Huskysort

R. C. Hillyard, Yunlu Liaozheng, Sai Vineeth K. R

摘要:

关于排序问题的大量文献都集中在最小化比较和/或交换/副本的数量上。然而,衡量排序算法性能的一个更合适的标准是基于所需的数组访问的总数(“工作”)。对于一个基于分而治之的排序(包括该主题的迭代变体),我们可以将工作分为线性的(即$\textbf{O}(N)$)工作和线性的(即$\textbf{O}(N log N)$)工作。将工作从线性阶段移动到线性阶段的算法可能能够减少阵列访问的总数,并且间接地减少处理时间。本文介绍了一种排序方法,它通过替代廉价的比较,尽可能地减少了昂贵的比较在线性阶段的数量。在Java中,两种系统排序是双枢轴快速排序(用于原语)和对象的Timsort。我们证明,这两种算法的组合可以运行速度显着比单独的算法的类型的对象是昂贵的比较。我们称之为改进的排序算法Huskysort。

英文摘要:

Much of the copious literature on the subject of sorting has concentrated on minimizing the number of comparisons and/or exchanges/copies. However, a more appropriate yardstick for the performance of sorting algorithms is based on the total number of array accesses that are required (the "work"). For a sort that is based on divide-and-conquer (including iterative variations on that theme), we can divide the work into linear, i.e. $\textbf{O}(N)$, work and linearithmic, i.e. $\textbf{O}(N log N)$, work. An algorithm that moves work from the linearithmic phase to the linear phase may be able to reduce the total number of array accesses and, indirectly, processing time. This paper describes an approach to sorting which reduces the number of expensive comparisons in the linearithmic phase as much as possible by substituting inexpensive comparisons. In Java, the two system sorts are dual-pivot quicksort (for primitives) and Timsort for objects. We demonstrate that a combination of these two algorithms can run significantly faster than either algorithm alone for the types of objects which are expensive to compare. We call this improved sorting algorithm Huskysort.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑