arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2402.01816cs.DScs.CYcs.DCcs.PF
收藏

简单对称可持续排序——greeNsort 文章

Simple Symmetric Sustainable Sorting -- the greeNsort article

Jens Oehlschlägel

AI总结:

本文探索分治排序算法中对称性的作用,设计了greeNsort系列快速排序和归并排序算法,在CPU效率、适应性和内存需求间实现更优权衡,并呼吁业界采用对称代码镜像以应对气候紧急状况。

摘要:

我们探索了排序算法解空间中一个未被涉足的领域:分治算法中对称性的作用。我们设计并发现了新颖的简单二分快速排序和归并排序算法,它们在连续空间内运行,并在最坏情况CPU效率、最佳情况适应性和内存需求之间实现了更优的权衡。与现有技术相比,'greeNsort'算法需要更少的硬件(内存)和/或更少的能量(CPU)。新算法契合一个理论框架:'Footprint'关键绩效指标允许比较具有不同内存需求的算法,一种新的排序API目标定义简化了具有镜像扫描方向的稳定算法的构建,而我们的序数机器模型鼓励最小化访问'距离'的稳健算法。与早期的'Quicksort'不同,我们的'Zacksort'、'Zucksort'和'Ducksort'算法在CPU效率和并列适应性之间实现了最优结合。与早期需要100%远端缓冲区的'Mergesort'不同,我们的'Frogsort'和'Geckosort'算法以50%或更少的本地缓冲区实现了类似的CPU效率。与针对完全预排序最佳情况优化的自然归并排序(如'Timsort')不同,我们的'Octosort'和'Squidsort'算法在真实排序任务中实现了对预排序最佳情况的出色双向适应性,同时不牺牲最坏情况效率。我们的'Walksort'和'Jumpsort'比Astrelin令人印象深刻的内存占用较低的'Grailsort'和'Sqrtsort'具有更低的足迹。鉴于当前的气候紧急状况,这是对所有排序库维护者、使用自定义排序代码的软件工程师、教授算法的教授、设计编程语言、编译器和CPU的IT专业人士的行动号召:检查更好的算法并考虑对称代码镜像。

英文摘要:

We explored an uncharted part of the solution space for sorting algorithms: the role of symmetry in divide&conquer algorithms. We found/designed novel simple binary Quicksort and Mergesort algorithms operating in contiguous space which achieve improved trade-offs between worst-case CPU-efficiency, best-case adaptivity and RAM-requirements. The 'greeNsort' algorithms need less hardware (RAM) and/or less energy (CPU) compared to the prior art. The new algorithms fit a theoretical framework: 'Footprint' KPIs allow to compare algorithms with different RAM-requirements, a new 'definition' of sorting API-targets simplifies construction of stable algorithms with mirrored scan directions, and our ordinal machine model encourages robust algorithms that minimize access 'distance'. Unlike earlier 'Quicksorts', our 'Zacksort', 'Zucksort' and 'Ducksort' algorithms optimally marry CPU-efficiency and tie-adaptivity. Unlike earlier 'Mergesorts' which required 100% distant buffer, our 'Frogsort' and 'Geckosort' algorithms achieve similar CPU-efficiency with 50% or less local buffer. Unlike natural Mergesorts such as 'Timsort' which are optimized for the best case of full-presorting, our 'Octosort' and 'Squidsort' algorithms achieve excellent bi-adaptivity to presorted best-cases without sacrificing worst-case efficiency in real sorting tasks. Our 'Walksort' and 'Jumpsort' have lower Footprint than the impressive low-memory 'Grailsort' and 'Sqrtsort' of Astrelin. Given the current climate-emergency, this is a call to action for all maintainers of sorting libraries, all software-engineers using custom sorting code, all professors teaching algorithms, all IT professionals designing programming languages, compilers and CPUs: check for better algorithms and consider symmetric code-mirroring.

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

↑