Computer Science I / Processor, Memory, and Buses
Practice question · Multiple choice

A CPU running at 3 GHz executes an instruction in well under a nanosecond and waits around 100 nanoseconds for main memory. What does that ratio mean in practice?

Hints
  1. Convert the wait into instructions: how many could have run in 100 ns?
  2. Ask which of two algorithms wins, fewer operations scattered in memory, or more operations run sequentially.
Show the answer

B. That memory access patterns matter more than operation counts

Why

A hundred nanoseconds is roughly 300 instructions the processor could have executed instead, so a miss dwarfs the arithmetic. That is why an array often beats a linked list with the same big-O, and why memory layout is a first-order performance concern rather than a detail.

Read the lesson: Processor, Memory, and Buses →

Practise Processor, Memory, and Buses

The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Processor, Memory, and Buses