Slide 54
Slide 54 text
https://speakerdeck.com/peterg/sort-hash-pgconfus-2017
Figure 2. Replacement-selection sort vs. QuickSort
°..
.... ~.~_~.~
.~o,.%°~o,.
The tournament tree of replacement-selection sort at left has bad cache behavior, unless
the entire tournament fits in cache. The diagram at left shows the memory references as a
winner is removed, and a new element is added to the tournament. Each traversal of the tree
has many cache misses at the leaves of the tree. By contrast, the QuickSort diagrammed
on the right fits entirely in the on-board cache, and partially in the on-chip cache.
[1] AlphaSort: A Cache-Sensitive Parallel External Sort — Nyberg, Barclay, Cvetanovic, Gray, and Lomet (VLDB Journal Volume 4, 1995)