Summary

In this chapter, we have seen:

  • The three rules of optimization:
    • Make it work first
    • Take the user's point of view
    • Keep the code readable
  • An optimization strategy based on writing a scenario with speed objectives
  • How to profile CPU or memory usage and a few tips for network profiling

Now that you know how to locate your performance problems, the next chapter provides some popular and generic strategies to get rid of them.

Get Expert Python Programming - Second Edition 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.