"Seconds lie. They depend on your laptop, your battery, and whether Spotify is open. Steps tell the truth."
The Problem With a Stopwatch
The instinct is to measure cost in seconds: run it, time it, done. But seconds are a terrible ruler. The same code runs faster on a newer chip, slower on battery saver, slower again when forty browser tabs are fighting for memory. Time it on Monday and Friday and you'll get two different numbers for identical code. If your measurement changes when nothing about the algorithm changed, it's measuring the machine, not the algorithm.
So we throw away the clock and count something the hardware can't fudge: how many basic steps the algorithm takes, as a function of the input size. Call the input size n. A scan of a list does roughly n steps. A nested scan does roughly n × n. That count doesn't care about your chip or your battery — it's a property of the recipe itself.
Shape Beats Speed
Here's the part that feels wrong at first: a slow computer running a good algorithm beats a fast computer running a bad one, as long as the input is big enough. A blazing machine doing n² steps will lose to a sluggish one doing n steps — not for small n, but the crossover always comes, and after it the gap only widens. The shape of the growth (does doubling the input double the work, or quadruple it?) dominates everything else once data gets real.
That's why "just buy a faster server" is a trap. Faster hardware shifts the line up a bit; a better algorithm changes its slope. You can't out-hardware a bad slope forever.
The Constant Trap
Beginners love to shave constants — "I made it 2× faster by combining two loops!" Sometimes that matters. But if the underlying shape is n², shaving a constant just delays the wall; it doesn't move it. Fix the shape first (can this be n instead of n²?), and only then sweat the constants. We'll make this rigorous in the Complexity track — this lesson just plants the reflex.