Multiway Powersort

09/14/2022
by   William Cawley Gelling, et al.
0

Powersort (Munro Wild, ESA2018) has recently replaced Timsort's suboptimal merge policy in the CPython reference implementation of Python, as well as in PyPy and further libraries. 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. As observed with Multiway Quicksort (Kushagra et al., ALENEX 2014; Aumüller Dietzfelbinger, TALG 2016; Wild, PhD thesis 2016) and the inclusion of Dual-Pivot Quicksort in the Java runtime library, memory transfers increasingly determine the cost of internal sorting. 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 performance of Powersort.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/10/2018

Nearly-Optimal Mergesorts: Fast, Practical Sorting Methods That Optimally Adapt to Existing Runs

We present two stable mergesort variants, "peeksort" and "powersort", th...
research
09/22/2018

Adaptive Shivers Sort: An Alternative Sorting Algorithm

We present a stable mergesort, called , that exploits the existence of m...
research
12/10/2021

FLiMS: a Fast Lightweight 2-way Merger for Sorting

In this paper, we present FLiMS, a highly-efficient and simple parallel ...
research
05/22/2018

On the Worst-Case Complexity of TimSort

TimSort is an intriguing sorting algorithm designed in 2002 for Python, ...
research
04/24/2023

Sorting wild pigs

Chjara, breeder in Cargèse, has n wild pigs. She would like to sort her ...
research
09/17/2022

Robust and Efficient Sorting with Offset-Value Coding

Sorting and searching are large parts of database query processing, e.g....
research
09/11/2020

Kvik: A task based middleware with composable scheduling policies

In this paper we present Kvik: an implementation of a task-based "middle...

Please sign up or login with your details

Forgot password? Click here to reset