MEPX
Chapter 1 of 12All chapters

Chapter 1 of 12

Why complexity matters

Timing one run tells you almost nothing.

Scale, not speed

Code that handles a thousand rows in a blink can stall on a million. Complexity predicts that jump without running it, which is the whole point of the notation.

  • Hardware makes constants smaller. It does not change the shape of the growth.
  • The interview question is really: what happens when this succeeds and the data grows.

Measure too

Analysis tells you which approach can scale. A profiler tells you where the time actually goes today. Good engineering uses both, in that order.