Virtual-Memory Powersort

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Moltmann, Finn, Nakajima, Tamio-Vesa, Wild, Sebastian
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911720730001408
author Moltmann, Finn
Nakajima, Tamio-Vesa
Wild, Sebastian
author_facet Moltmann, Finn
Nakajima, Tamio-Vesa
Wild, Sebastian
contents We give a more space-efficient implementation of adaptive mergesort: Virtual-Memory Powersort. Using internal buffering techniques, we significantly reduce the memory consumption of the algorithm; specifically, for sorting $n$ objects the required buffer area is reduced from space for $n/2$ objects to $O(\sqrt{n \log n})$ objects. While this space-efficiency can be achieved (indeed reduced to $O(1)$) conceptually very easily with known inplace merging algorithms, using these as a drop-in replacement for the standard merge algorithm incurs a substantial slow-down. Virtual-Memory Powersort, by contrast, uses the same number of moves and comparisons as previous Powersort implementations up to an additive $O(n)$ term. We report on an empirical running-time study comparing our implementation against other Powersort variants and state-of-the-art stable sorting methods, demonstrating that almost in-place stable sorting can be achieved with negligible overhead in many scenarios.
format Preprint
id arxiv_https___arxiv_org_abs_2605_27147
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Virtual-Memory Powersort
Moltmann, Finn
Nakajima, Tamio-Vesa
Wild, Sebastian
Data Structures and Algorithms
Performance
We give a more space-efficient implementation of adaptive mergesort: Virtual-Memory Powersort. Using internal buffering techniques, we significantly reduce the memory consumption of the algorithm; specifically, for sorting $n$ objects the required buffer area is reduced from space for $n/2$ objects to $O(\sqrt{n \log n})$ objects. While this space-efficiency can be achieved (indeed reduced to $O(1)$) conceptually very easily with known inplace merging algorithms, using these as a drop-in replacement for the standard merge algorithm incurs a substantial slow-down. Virtual-Memory Powersort, by contrast, uses the same number of moves and comparisons as previous Powersort implementations up to an additive $O(n)$ term. We report on an empirical running-time study comparing our implementation against other Powersort variants and state-of-the-art stable sorting methods, demonstrating that almost in-place stable sorting can be achieved with negligible overhead in many scenarios.
title Virtual-Memory Powersort
topic Data Structures and Algorithms
Performance
url https://arxiv.org/abs/2605.27147