Benchmark Code
Before we begin, I must caution you: You should only optimize code when performance becomes an issue. Focus on making your code correct. After you have a functioning application and if you suspect performance issues, then diagnose and improve performance. Early optimization can create complex, hard-to-maintain code. It also derails you from quickly implementing features and shipping a finished application.
Even after you’ve built an application, optimization can add hard-to-maintain complexity. The benchmarking tools that you’ll explore in a moment can help you measure performance and decide if the performance improvement justifies the code complexity.
With that out of the way, let’s investigate performance. In this section, you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access