Thinking about Heaps
Observations
- finding a child/parent index is a multiply/divide by two
- operations jump widely through the heap
- each operation looks at only two new nodes
- inserts are at least as common as deleteMins
Realities
- division and multiplication by powers of two are fast
- looking at one new piece of data sucks in a cache line
- with huge data sets, disk accesses dominate