Optimization is a zero-sum game

Arpit Bhayani

Arpit Bhayani

May 13, 2025 • 1 min read


Optimization is a zero-sum game.

When designing systems or writing code, you’re always making trade-offs. You’re balancing space vs. time complexity in algorithms, read vs. write latency when configuring databases, CPU vs. memory usage in runtime environments, and so on.

If you think something is a pure win-win, look deeper because you are probably trading off something - performance, simplicity, scalability, or maintainability. This might look tricky at first, but over time, you will become good at spotting these and making good design and implementation decisions.

Engineering is all about choosing the right ones for the problem at hand. Remember, you get some, you lose some.

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses