"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil."
– Donald Knuth
This chapter is all about optimization—its general principles and common profiling techniques. We will discuss the most basic rules of optimization that every developer should be aware of. We will also learn how to identify application performance bottlenecks and use common profiling tools.
In this chapter, we will cover the following topics:
- The three rules of optimization
- Optimization strategy
- Finding bottlenecks
Let's discuss the three rules of optimization.