betaFeedback

WorksComputer Science

SotSort: a stable quicksort with a tunable buffer

Abstract

SotSort is a stable comparison sort whose single code path runs with anything from a fixed 16 KB buffer to a full n-element buffer. Its core is a stable quicksort that partitions blocks through the buffer and gathers them with rotations. This report summarises the design, states which parts are borrowed, and compares an implementation against blitsort, fluxsort, glidesort, driftsort, GrailSort and WikiSort. On one 2-vCPU machine, with 32- and 64-bit integers, the constant-memory mode takes between 0.32 and 0.82 of blitsort's time on 17 of 22 input classes and between 0.92 and 1.07 on the other five. With a comparator that rules out the vector partition it is slower than blitsort on 4 of 11 classes, by up to 2.3 times on sorted input. Against Virtual-Memory Powersort, on its authors' own harness and with the same auxiliary memory, the first measurement lost on most inputs; after three changes it located (one of them adopts that algorithm's paging scheme), SotSort is faster in 43 of 48 type and input combinations at n=10^6 on two machines. At n=10^7 on partially sorted integers it is between 7% faster and 7% slower depending on the machine, and on near-random input it is still slower: by 9% on integers at n=10^7, and by 5 to 17% at n=10^6 when comparisons are expensive. All numbers are preliminary.

Paper details

vlnc:W_499zayjw
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
arXiv nonexclusive license
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…