Memory access on the Apple M1 processor
When a program is mostly just accessing memory randomly, a standard cost model is to count the number of distinct random accesses. The general idea is that memory access is much slower than most other computational tasks.
Source: Memory access on the Apple M1 processor, an article by Daniel Lemire.