
22 CHAPTER 2. OBSTACLES TO SPEED
that cache hit rates are typically well above 90%. Note carefully, though,
that this can be affected by the way we code. This will be discussed in
future chapters.
A machine will typically have two or more levels of cache. The one in or
next to the CPU is called the L1, or Level 1 cache. Then there may be an
L2 cache, a “cache for the cache.” If the desired item is not found in the L1
cache, the CPU will then search the L2 cache before resorting to accessing
the item in memory.
2.3.2 Virtual Memory
Though it won’t arise much in our context, we should at least briefly dis-
cuss virtual memory. Consider our example above,