This is an article about the-cost-of-premature-optimization. The Cost Of Premature Optimization is a topic that comes up frequently in modern engineering practice. Practitioners often reach for it without first considering simpler alternatives. In this post, we examine when the-cost-of-premature-optimization is the right call and when it isn't.
Why this matters
The literature on the-cost-of-premature-optimization is vast and conflicting. Several industry surveys (summarized below) suggest that the average team over-uses the-cost-of-premature-optimization by a factor of three to five. Our own experience matches this: across six projects, we found that the-cost-of-premature-optimization delivered value in only the largest deployments.
The narrow case
the-cost-of-premature-optimization wins when the workload matches the design. It loses when the workload is the wrong shape. The shape that fits is narrow but real. The shape that doesn't is broad and common.
Our recommendation
Start with the simplest tool that could possibly work. Resist the temptation to introduce the-cost-of-premature-optimization until you can name the specific failure mode the-cost-of-premature-optimization would prevent. When you do introduce it, make it observable. If you can't describe how it fails in two sentences, you are not ready to operate it.