Donald Knuth is well-known for his famous statement, “Premature Optimization is the root cause of all evil.”
This quote in its entirety sheds more light on the importance of optimizing development.
We need to forget about the small efficiency gains, which is 97% of the time. Premature optimization is the root cause of all evil. We should not miss out on the critical 3%.
What impact will premature optimization have on software development?
These points will help you focus on writing clean code that is easy to maintain. Performance is an important aspect of any solution. However, it shouldn’t be the driving force behind your project. With the vast optimizations and machine power available, this should be an optional consideration. Your code may be less efficient and more difficult to maintain.
What about the crucial 3% of optimization? It is a great way of identifying bottlenecks in your code that can cause performance problems by setting up benchmarking and profiling tools. You can find many performance analysis tools for your language. You can also stress test your web pages and servers with services such as loader.io or NewRelic to determine where performance is suffering. You can also set up monitoring of your database server to identify areas where queries are failing. These tests are often simple to set up and can help you identify areas where optimization may be possible.
You can now focus on writing clean, maintainable code, after all the progress made in programming languages, and frameworks. The underlying system should take care of optimizing itself. Only do performance optimizations when you feel it is necessary. Performance tests will show you exactly where to update.