10PERFORMANCES AND OPTIMIZATIONS
Optimizing is rarely the first thing you think about when developing, but there always comes a time when optimizing for better performance will be appropriate. That’s not to say you should write a program with the idea that it will be slow, but thinking about optimization without first figuring out the right tools to use and doing the proper profiling is a waste of time. As Donald Knuth wrote, “Premature optimization is the root of all evil.”1
Here, I’ll show you how to use the right approach to write fast code and where to look when more optimization is needed. Many developers try to guess where Python might be ...
Get Serious Python 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.