5 Premature Optimization Is the Root of All Evil

In this chapter, you’ll learn how premature optimization can hinder your productivity. Premature optimization is the act of spending valuable resources—time, effort, lines of code—on unnecessary code optimizations, especially before you have all the relevant information. It is one of the main problems with poorly written code. Premature optimization comes in many flavors; this chapter will introduce some of the most relevant ones. We’ll study practical examples showing where premature optimization occurs that will be relevant for your own code projects. We’ll close the chapter with actionable ...

Get The Art of Clean Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.