Multiway Powersort
William Cawley Gelling, Markus E. Nebel, Benjamin Smith and, Sebastian Wild

TL;DR
Multiway Powersort is a stable mergesort variant that optimizes k-way merging to reduce memory transfers and improve sorting speed, building on Powersort's adaptive merge policy and demonstrating significant performance gains.
Contribution
It introduces a multiway merging strategy for Powersort that nearly optimally exploits existing runs, reducing memory transfers and increasing sorting efficiency.
Findings
4-way Powersort achieves substantial speedups over 2-way Powersort.
The method reduces memory transfers in internal sorting.
It maintains Powersort's adaptive performance.
Abstract
We present a stable mergesort variant, Multiway Powersort, that exploits existing runs and finds nearly-optimal merging orders for k-way merges with negligible overhead. This builds on Powersort (Munro & Wild, ESA2018), which has recently replaced Timsort's suboptimal merge policy in the CPython reference implementation of Python, as well as in PyPy and further libraries. Multiway Powersort reduces the number of memory transfers, which increasingly determine the cost of internal sorting (as observed with Multiway Quicksort (Kushagra et al., ALENEX 2014; Aum\"uller & Dietzfelbinger, TALG 2016; Wild, PhD thesis 2016) and the inclusion of Dual-Pivot Quicksort in the Java runtime library). We demonstrate that our 4-way Powersort implementation can achieve substantial speedups over standard (2-way) Powersort and other stable sorting methods without compromising the optimally run-adaptive…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Parallel Computing and Optimization Techniques · Software Testing and Debugging Techniques
