Terms&Tables

Definition&Convictions

Table 10.1: Definitions and Convictions
Symbol Name Memo
C* Ordinal-machine minimize monotonic cost of distance
C* Footprint measure variableCost x %fixedCost
C* Symmetric-asymmetry low-level-asymmetry, high-level-symmetry
D Symmetric-sorting ‘ascleft’, ‘ascright’, ‘descleft’, ‘descright’
C* Symmetric-recursion symmetric mutual recursion
C* Code-mirroring left-right mirroring of code
C* Symmetric-compiler compiling symmetric language
C* Symmetric-hardware instructions for mirroring code
C No3rd-partition Early Termination without 3rd partition
C Asymmetric-partitioning Asymmetric-partitioning is good
C Undirected-sorting not requesting asc/desc order
C* Share&Merge recursively share buffer until can splitting
C DSDS Direct Sorting Different Size

Bold techniques

Table 10.2: Bold techniques
Symbol Name Memo
B Symmetric-language symmetric semi-in-place merging data and buffer
B DIET Distinct Identification for Early Termination
B FLIP Fast Loops In Partitioning
B POET Pre-Order Early Termination
B Data-driven-location data decides return memory
B Data-driven-order data decides asc/desc order
B Gapped-setup odd-even data-buffer layout
B Gapped-merging merge in odd-even data-buffer layout
B Buffer-merging merging data and buffer
B Buffer-splitting splitting data and buffer
B Frogsort symmetric-merging ½-adaptive presorting
B Geckosort symmetric-merging ¼-adaptive pre/rev
B Squidsort lazy undirected symmetric sort
B DSNS Direct Sorting Null-terminated Strings
B DSPE Direct Sorting Pointered Elements
B* Wing-partitioning Stable partitioning without counting
B* Buffer-partitioning partitioning data and buffer
B* Symmetric-partitioning symmetric partitioning data and buffer
B* Gapped-wrapup collecting the gapped results
B parallel-Symmetric-merging iterative parallel merging

Algorithms

Table 10.3: Algorithms
Symbol Name Memo
A Zocksort self-recursive DIET Quicksort
A Zacksort zig-zagging DIET-FLIP Quicksort
A Zucksort semi-flipping DIET-FLIP Quicksort
A Ducksort semi-flipping POET-FLIP Zucksort
A Omitsort skip merge and return pointer to data
A Octosort lazy directed undirected sort
A GKnuthsort Knuthsort in odd-even data-buffer
A TKnuthsort Knuthsort with buffer-merging (T-moves)
A Crocosort Knuthsort with buffer-merging (R-moves)
A Frogsort0 Frogsort on triplets or bigger chunks
A Frogsort1 balanced Frogsort on single elements
A Frogsort2 imbalanced splitting Frogsort
A Frogsort3 imbalanced sharing Frogsort
A Frogsort6 generalized Frogsort
A Squidsort1 lazy symmetric sort (50% buffer)
A Squidsort2 lazy symmetric sort (<50% buffer)
A VKnuthsort Varying-size Knuthsort
A VFrogsort1 Varying-size Frogsort1
A Kiwisort Stable Partition&Pool sort 100% buffer
A Swansort distance-reducing stable P&P sort 100% buffer
A Storksort distance-reducing stable P&P sort 50% buffer

Extended&Further

Table 10.4: Extended and Further algorithms
Symbol Name Memo
F Zackpart MECEP partial sorting between l and r
F Zuckpart MECEP partial sorting between l and r
F Zackselect MECEP more informative than Quickselect
F Zuckselect MECEP more informative than Quickselect
F Zackpartleft MECEP partial sorting left of r
F Zuckpartleft MECEP partial sorting left of r
F Zackpartright MECEP partial sorting right of l
F Zuckpartright MECEP partial sorting right of l
E PKnuthsort parallel Knuthsort
E PFrogsort0 Parallel Frogsort0
E PFrogsort1 Parallel Frogsort1
E PFrogsort2 Parallel Frogsort2
E PFrogsort3 Parallel Frogsort3
E Incremental-Zacksort Amortized Incremental-Zacksort
E Zackheaps Symmetric (tie-handling) Quickheaps
E Incremental-Frogsort Amortized Incremental-Frogsort
E Frogsteps Symmetric stable dictionary

Abbreviations

Asc Ascending
AscLeft Ascending from Left
AscRight Ascending from Right
AscPoor Ascending unstable
COMREC T-level technique - (COM)puting on the (REC)ursion
DAG (D)irected (A)cyclic (G)raph
Desc Descending
DescLeft Descending from Left
DescPoor Descending unstable
DescRight Descending from Right
DIET B-level innovation – (D)istinct (I)dentification for (E)arly (T)ermination
BIAS (B)inary (I)dentified (A)symmetric (S)earch
DONOTUBE T-level technique – (DO) (NO)t (TU)ne the (BE)st case
DSDS C-level innovation – (D)irect (S)orting (D)ifferent (S)ize
DSNS B-level innovation – (D)irect (S)orting (N)ull-terminated (S)trings
DSPE B-level innovation – (D)irect (S)orting (P)ointered (E)lements
EQ (EQ)ual
FLIP B-level innovation – (F)ast (L)oops (I)n (P)artitioning
FROG (F)lip (R)ecursive (O)rganized (G)aps
GECKO (G)ap (E)xchange (C)an (K)eep (O)rder
GE (G)reater (E)qual
GT (G)reater (T)han
IFS (Incremental) (F)rog (S)ort
IPS4o (I)n-place (P)arallel (S)uper (S)calar (S)ample(So)rt
IQS (Incremental) (Q)uick (S)ort
IZS (Incremental) (Z):ck (S)ort
KPI (K)ey (P)erformance (I)ndicator
LE (L)ower (E)qual
LT (L)ower (T)han
MECE (M)utually (E)xclusive and (C)ollectively (E)xaustive
MECEP T-level technique - (M)utually (E)xclusive and (C)ollectively (E)xaustive (P))artitioning
NE (N)ot (E)qual
NORELORE T-level technique – (NO)-(RE)gret (LO)op-(RE)use
PHOSITA (P)erson (H)aving (O)rdinary (S)kill (I)n (T)he (A)rt
POET B-level innovation – (P)re-(O)rder (E)arly (T)ermination
RAM (R)andom (A)ccess (M)emory
RAPL (R)unning (A)verage (P)ower (L)imit, Energy measurement of Intel

Glossary

%RAM Ratio of total memory relative to data size. \((data+buffer)/data\), see Sustainable measurement and Methods&Measurement
Access-asymmetry the fact that memory access is asymmetric either the left element first then the right one or the right element first and then the left one, see Asymmetries
Asymmetric-partitioning C-level innovation – Asymmetric partitioning around a pivot is good, see DIET method
Bimesort T-level innovation – stable Bitonic Nocopy-Mergesort, see First algo (Bimesort)
Buffer-asymmetry the fact that buffer placement relative to data is asymmetric, data may either be placed left of buffer memory (DB) or right of buffer memory (BD), see Asymmetries
Buffer-merging B-level innovation – merging data and buffer, see Buffer-merging (TKnuthsort, Crocosort)
Buffer-partitioning B-level innovation – partitioning data and buffer, see Partition&Pool Algorithms
Buffer-sharing T-level technique – dedicate buffer to one branch at a time (serially), see Engineering Frogsort3
Buffer-splitting T-level technique – split buffer into multiple parts that can be used parallel, see Engineering Frogsort3
cFootprint a [Footprint measure] using [CPUtime] for variableCost, \(CPUtime \cdot %RAM\), see Sustainable measurement and Methods&Measurement
Chicksort A-level innovation – a Quicksort not stopping pointers on pivot-ties but still robust, instead of moving one pointer across all ties both pointers are moved alternating by one element, see Symmetry
Code-mirroring C-level innovation – left-right mirroring of redundant code sections, see Mirroring code
Crocosort A-level innovation – [Knuthsort] with buffer-merging (and Relocation moves), see Buffer-merging (TKnuthsort, Crocosort)
CPUtime measurement of CPU-time (summed over all parallel threads and processes), see Sustainable measurement and Methods&Measurement
RUNtime measurement of elapsed time (max-clock minus min-clock of all parallel threads and processes), see Sustainable measurement and Methods&Measurement
Data-driven-location B-level innovation – the data decides which memory is returned, see Pre-Adpative (Omitsort)
Data-driven-order B-level innovation – the data decides whether sorted or rev-sorted and returns the order, see Bi-adpative (Octosort)
Divide&Conquer T-level technique – recursive divide and conquer paradigm, see Further techniques
Ducksort A-level innovation – an adaptive [Zucksort] using the [POET]-[FLIP] methods, see Engineering Ducksort
DucksortB E-level innovation – branchless block-tuned version of [Ducksort], see Z:cksort implementation
eFootprint a [Footprint measure] using an Energy measurement for variableCost, \(Energy \cdot %RAM\), see [pcdFootprint], Sustainable measurement and Methods&Measurement
Energy a measurement of execution variableCost, here using [RAPL], see [pcdEnergy], Sustainable measurement and Methods&Measurement
Footprint C-level innovation – measure \(variableCost \cdot %fixedCost\) for evaluating algorithms, see [tFootprint], see [cFootprint], see [eFootprint], Sustainable measurement and Methods&Measurement
Frogsort B-level innovation – symmetric-merging ½-adaptive to presorting, see Frogsort & Geckosort
Frogsort0 A-level innovation – Frogsort on triplets or bigger chunks, see Engineering Frogsort0
Frogsort1 A-level innovation – balanced Frogsort on single elements, see Engineering Frogsort1
Frogsort1A F-level innovation – [Frogsort1] with non-overlap tuning for presorted data, for a bi-adaptive algorithm see [Squidsort1]
Frogsort2 A-level innovation – imbalanced splitting Frogsort on single elements, see Engineering Frogsort2
Frogsort2A F-level innovation – [Frogsort2] with non-overlap tuning for presorted data, for a bi-adaptive algorithm see [Squidsort2]
Frogsort3 A-level innovation – imbalanced sharing Frogsort on single elements, see Engineering Frogsort3
Frogsort6 A-level innovation – generalized Frogsort on single elements, see Engineering Frogsort6
Frogsteps E-level innovation – a dictionary based on [Incremental Frogsort], see Incremental sorting
Funnelsort a cache-oblivious Mergesort algorithm using the Van-Emde-Boas memory-layout (Prokop:1999, Frigo et al. (1999)), difficult for \(N \ne 2^k\), for a simplified Version see [Lazy-Funnelsort]
Gapped-merging B-level innovation – merge in common odd-even data-buffer layout, see [Gapped merging (GKnuthsort)]
Gapped-setup B-level innovation – initial common odd-even data-buffer layout, see [Gapped merging (GKnuthsort)]
Gapped-wrapup B-level innovation – collecting the gapped results, see Partition&Pool Algorithms
Geckosort B-level innovation – symmetric-merging ¼-adaptive to pre-/rev-sorting, see Frogsort & Geckosort
Geckosort0 A-level innovation – [Geckosort] version of [Frogsort0], see the testbed
Geckosort1 A-level innovation – [Geckosort] version of [Frogsort1], see Frogsort & Geckosort
Geckosort2 A-level innovation – [Geckosort] version of [Frogsort2]
Geckosort3 A-level innovation – [Geckosort] version of [Frogsort3]
Geckosort6 A-level innovation – [Geckosort] version of [Frogsort6]
GKnuthsort A-level innovation – [Knuthsort] alternating between odd-even data-buffer positions, see [Gapped merging (GKnuthsort)]
Glidesort T-level technique – O. R. L. Peters (2023a);O. R. L. Peters (2023b), a natural-Mergesort tuned for adaptivity for presorted data and for duplicates by lazily delaying sorting of unsorted sequences in the hope to sort huge chunks of unsorted data with a partitioning sort, see also [Peeksort]
Grailsort T-level technique – an in-place mergesort invented by Huang and Langston (1992) and realized by Astrelin (2013), see Low-memory
Jumpsort A-level innovation – distance reducing version of [Walksort] using extra relocation moves, see Low-memory
IMergesort T-level technique – simple in-place-Mergesort as implemented by Astrelin, see Low-memory
In-place Parallel Super Scalar Samplesort In-place Parallel Super Scalar Samplesort [IPS4o] (Sanders:2004, Axtmann:2017)
Incremental-Frogsort E-level innovation – a lazy incremental [Frogsort] with not more than 50% buffer and amortized \(\mathcal{O}(N\log{N})\) cost, see Incremental sorting
Incremental-Quicksort a lazy incremental [Quicksort] by Navarro and Paredes (2010) with expected amortized \(\mathcal{O}(N\log{N})\) cost, see Incremental sorting
Incremental-Zacksort E-level innovation – a lazy incremental [Zacksort] with expected amortized \(\mathcal{O}(N\log{D})\) cost, see Incremental sorting
Introsort Introspective sort by Musser (1997) which combines a [Quicksort] with a fallback to [Heapsort] if the recursion-depth gets too deep, see Z:cksort implementation
Insertionsort a simple (incremental) sort that builds a sorted set by iteratively integrating single elements, it’s likely very old, D. Knuth (1973) mentions that John Mauchly mentioned an optimization using [binary search] in 1946, see Incremental sorting
Heapsort Unstable in-place sort by Williams (1964), \(\mathcal{O}(N\log{N})\) worst-case, but not stable and not fast, due to wild random access, it first build a heap in-place, than removes one minimum (or maximum) value after the other, again in-place, see Z:cksort implementation
Kiwisort A-level innovation – a stable [wing-partitioning] sort with 100% distant buffer, see Partition&Pool Algorithms
Knuthsort T-level technique – Nocopy mergesort (Sedgewick (1998)) with Knuth’s merge (D. Knuth (1973)), see Reference algo (Knuthsort)
Lazy-Funnelsort a simplified version of [Funnelsort] (Vinther:2003, Brodal, Fagerberg, and Vinther (2008)) which sacrifices the contiguous Van-Emde-Boas scheme for block-managed memory
Librarysort a non-contiguous lazy incremental [Insertionsort] (Bender, Farach-Colton, and Mosteiro (2006)) using random-gaps with amortized \(\mathcal{O}(N\log{N})\) cost, see Incremental sorting
Mergesort class of (prior art) sorting algorithms based on merging, invented by von Neumann, see The Mergesort-Dilemma
Mergesort-dilemma either simple, efficient and parallel for non-sorted data (DivideConquer, i.e. [Bimesort]) or serial bi-adaptive to presorted data with halved buffer requirement (natural-Mergesort, i.e. [Timsort]), see The Mergesort-Dilemma
Mutual-recursion T-level technique – recursion with two mutually calling functions, is more expressive than self-recursion, see Recursion model
No3rd partition C-level innovation – Early Termination does not need a 3rd partition, not even two, see DIET method
Octosort A-level innovation – lazy bi-adaptive [undirected-sorting] variant of [Knuthsort] that return its order, see [Bi-adaptive (Octosort)]
Omitsort A-level innovation – lazy adaptive variant of [Knuthsort] that uses [Data-driven location], see [Pre-Adaptive (Omitsort)]
Order-asymmetry the fact that that ‘order’ is asymmetric and reaches from ‘low’ to ‘high’ ‘keys’, see Asymmetries
Ordinal-machine C-level innovation – assume a monotonic cost of distance, hence minimize access- and move-distance, see [Ordinal Machine]
pcdEnergy the version of [RAPL] Energy used for comparison, see Sustainable measurement and Methods&Measurement
pcdFootprint the version of [RAPL] [eFootprint] used for comparison, see Sustainable measurement and Methods&Measurement
lean-parallel-merging T-level technique – lean parallel merging for an exact number of threads, see Parallel merging
Partition&Pool T-level technique – Recursive partition and pool paradigm, see Partition&Pool Algorithms
PDucksort Branch-Parallel [Ducksort] (without parallel partitioning), see Z:cksort implementation
Pdqsort A single-threaded highly tuned Quicksort algorithm invented by Orson Peters, very close to [Zucksort]
PDucksortB Branch-Parallel block-tuned [DucksortB] (without parallel partitioning), see Z:cksort implementation
Peeksort T-level technique – Munro and Wild (2018) Peeksort, a natural-Mergesort tuned for adaptivity, but inefficient for real sorting tasks, see The Mergesort-Dilemma and 2nd Reference (Timsort)
PFrogsort0 E-level innovation – Parallel [Frogsort0], see Parallel sorting
PFrogsort1 E-level innovation – Parallel [Frogsort1], see Parallel sorting
PFrogsort2 E-level innovation – Parallel [Frogsort2], see Parallel sorting
PFrogsort3 E-level innovation – Parallel [Frogsort3], see Parallel sorting
Pivot-asymmetry the fact that a binary pivot-comparison (one of [LT], [LE], [GT], [GE]) assigns an element equal to the pivot either to one partition or the other, see Asymmetries
PKnuthsort E-level innovation – parallel [Knuthsort], see Parallel sorting
Powersort T-level technique – Munro and Wild (2018) Powersort, a natural-Mergesort tuned for adaptivity, but inefficient for real sorting tasks, see The Mergesort-Dilemma and 2nd Reference (Timsort)
PQuicksort2 Branch-Parallel [Quicksort2] (without parallel partitioning), see Z:cksort implementation
PQuicksort2B Branch-Parallel block-tuned [Quicksort2B] (without parallel partitioning), see Z:cksort implementation
parallel-Symmetric-merging B-level innovation – iterative parallel [Symmetric-Merging], see Parallel merging
Quickheaps priority queue by Navarro and Paredes (2010) based on [Incremental Quicksort], see Incremental sorting
Quickpart partial sorting between l and r using [Quicksort2] methods, see Partial Z:cksort
Quickpartleft partial sorting left of r using [Quicksort2] methods, see Partial Z:cksort
Quickpartright partial sorting right of l using [Quicksort2] methods, see Partial Z:cksort
Quickselect T-level technique – searching for position in sorted set using partial sorting with [Quicksort2] methods invented by Hoare (1961a);Hoare (1961c) under the name ‘FIND’, see Partial Z:cksort
Quicksort T-level technique – class of (prior art) algorithms invented by Tony Hoare, most notably see [Quicksort1], [Quicksort2] and [Quicksort3], see The Quicksort-Dilemma
Quicksort1 classic loop-symmetric Quicksort by Hoare (1961b), Hoare (1961a), see The Quicksort-Dilemma
Quicksort2 classic loop-symmetric Quicksort stopping at pivot-ties following Singleton (1969), see The Quicksort-Dilemma
Quicksort2B T-level technique – branchless version of [Quicksort2] following Edelkamp and Weiß (2016),Edelkamp and Weiss (2016) (but without rudimentary early-termination on ties), see The Quicksort-Dilemma
Quicksort3 T-level technique – classic loop-symmetric Quicksort collecting ties in third partition following Bentley and McIlroy (1993), see The Quicksort-Dilemma
Quicksort-Dilemma either efficient for non-tied data (Quicksort2) or early termination on ties (Quicksort3), resolved by [Z:cksort], see The Quicksort-Dilemma
RQuicksort2 stabilized indirect [Quicksort2] using pointers, see Stabilized Quicksorts
RQuicksort2 block-tuned version of [RQuicksort2], see Stabilized Quicksorts
Share&Merge C-level innovation – recursively share buffer until can splitting, see Engineering Frogsort3
Split&Merge T-level technique – Recursive split and merge paradigm, see Split&Merge Algorithms
Sqrtsort T-level technique – a square-root buffer mergesort derived from [Grailsort] and realized by Astrelin (2014), see Low-memory
SQuicksort2 stabilized indirect [Quicksort2] moving elements and position-indicating integers, see Stabilized Quicksorts
SQuicksort2B block-tuned version of [SQuicksort2], see Stabilized Quicksorts
Squidsort B-level innovation – bi-adaptive (lazily ordered) version of [Frogsort] better than [Timsort] for hard sorting tasks, see Engineering Squidsort
Squidsort1 A-level innovation – bi-adaptive (lazily ordered) symmetric sort with 50% buffer, see Engineering Squidsort1
Squidsort2 A-level innovation – bi-adaptive (lazily ordered) symmetric sort with less than 50% buffer, see Engineering Squidsort2
Storksort A-level innovation – a distance reducing stable partitioning sort with 50% buffer, see Partition&Pool Algorithms
Swansort A-level innovation – a distance reducing stable partitioning sort with 100% buffer, see Partition&Pool Algorithms
Symmetric-asymmetry C-level innovation – embracing low-level-asymmetry within high-level-symmetry, see Symmetry principle
Symmetric-compiler C-level innovation – compiling symmetric language, see Mirroring code
Symmetric-hardware C-level innovation – instructions for mirroring code, see Mirroring code
Symmetric-language C-level innovation – symmetric programming language, see Mirroring code
Symmetric-merging B-level innovation – symmetric merging data and buffer, needs only 50% buffer or less, see [Symmetric merging]
Symmetric-partitioning B-level innovation – symmetric partitioning data and buffer, see [Symmetric merging] and Partition&Pool Algorithms
Symmetric-recursion C-level innovation – mutual recursion with left-right-symmetry, see Recursion model
Symmetric-sorting D-level innovation – defines four targets ([ascleft], [ascright], [descleft]), [descright] instead of the classic two ([asc], [desc]) for stable sorting, see Definition of sorting
tFootprint a [Footprint measure] using a runTime measurement for variableCost, \(runTime \cdot %RAM\), see Sustainable measurement and Methods&Measurement
Tie-asymmetry the fact that stable ties are asymmetric, they may represent their original order either from left to right (LR) or from right to left (RL), see Asymmetries
Timsort T-level technique – Peters:2002 Timsort, a natural-Mergesort tuned for adaptivity, but inefficient for real sorting tasks, see The Mergesort-Dilemma and 2nd Reference (Timsort)
TKnuthsort A-level innovation – [Knuthsort] with [buffer-merging] (and Transport moves), see Buffer-merging (TKnuthsort, Crocosort)
UKnuthsort T-level technique – stable indirect size-varying [Knuthsort], see Size-varying algos
Undirected-sorting C-level innovation – sorting without specifying order ([data-driven-order]), see Bi-adpative (Octosort)
UZacksort E-level innovation – unstable indirect size-varying [Zacksort], see Size-varying algos
UZacksortB E-level innovation – unstable indirect size-varying [ZacksortB] (block-tuned), see Size-varying algos
VFrogsort1 A-level innovation – stable direct size-varying [Frogsort1], see Size-varying algos
VKnuthsort A-level innovation – stable direct size-varying [Knuthsort], see Size-varying algos
Walksort A-level innovation – block-managed mergesort with sqrt buffer, more efficient than [Sqrtsort], see Low-memory, for a distance-minimizing version see [Jumpsort]
Wing-partitioning B-level innovation – stable partitioning without counting by writing the two partitions from both ends and keeping track of the number of tie-reversals, see Partition&Pool Algorithms
WQuicksort2 T-level technique – stabilized indirect size-varying [Quicksort2], see Size-varying algos
WQuicksort2B T-level technique – stabilized indirect size-varying [Quicksort2] (block-tuned), see Size-varying algos
Z:ckpart a common name for [Zackpart] and [Zuckpart] (and [Duckpart]), see Partial Z:cksort
Z:cksort a common name for [Zacksort] and [Zucksort] (and [Ducksort]), see Partial Z:cksort
Z:ckselect a common name for [Zackselect] and [Zuckselect] (and [Duckselect]), see Partial Z:cksort
Zackheaps E-level innovation – priority queue with efficient tie-handling combining [Quickheaps] with [Incremental Zacksort], see Incremental sorting
Zackpart F-level innovation – MECE partial sorting between l and r using [Zacksort] methods, see Partial Z:cksort
Zackpartleft F-level innovation – MECE partial sorting left of r using [Zacksort] methods, see Partial Z:cksort
Zackpartright F-level innovation – MECE partial sorting right of l using [Zacksort] methods, see Partial Z:cksort
Zackselect F-level innovation – MECE more informative than [Quickselect] using [Zacksort] methods, see Partial Z:cksort
Zacksort A-level innovation – zig-zagging [DIET]-[FLIP] Quicksort, see Engineering Zacksort
ZacksortB E-level innovation – branchless block-tuned version of [Zacksort], see Z:cksort implementation
Zocksort A-level innovation – self-recursive DIET Quicksort, see Engineering Zocksort
Zuckpart F-level innovation – MECE partial sorting between l and r using [Zucksort] methods, see Partial Z:cksort
Zuckpartleft F-level innovation – MECE partial sorting left of r using [Zucksort] methods, see Partial Z:cksort
Zuckpartright F-level innovation – MECE partial sorting right of l using [Zucksort] methods, see Partial Z:cksort
Zuckselect F-level innovation – MECE more informative than [Quickselect] using [Zucksort] methods, see Partial Z:cksort
Zucksort A-level innovation – a semi-flipping [Zacksort], see Engineering Zucksort
ZucksortB E-level innovation – branchless block-tuned version of [Zucksort], see Z:cksort implementation