CSE 326 Data Structures
The Memory Hierarchy Investigates Sorting

A victim of the Memory Hierarchy, headed by the mysterious entity known only as “CPU”

Memory Hierarchy Stats
 (made up)

The Memory Hierarchy Exploits Locality of Reference

So what?

Cache Details (simplified)

Selection Sort – Sucky Sort

Selection Sort Cache Misses

QuickSort Bows to Memory Hierarchy

Iterative MergeSort – not so good

Iterative MergeSort – cont’d

Tiled MergeSort – better

Tiled MergeSort – cont’d

Radix Sort – Very Naughty

Not enough RAM – External Sorting