Chapter 12. Performance Tuning, Profiling, and Concurrency


"Premature optimization is the root of all evil"

 --Donald Knuth, a renowned computer scientist and mathematician

In the real world, there are more important things than performance, such as features, robustness, maintainability, testability, and usability. That's one of the reasons that we delayed discussing the topic of performance until the last chapter of the book. We will give hints on improving performance with profiling as the key technique. For multicore, distributed systems, we will discuss the relevant frameworks too. We will discuss the following topics in this chapter:

  • Profiling the code
  • Installing Cython
  • Calling the C code
  • Creating a pool process with multiprocessing
  • Speeding up ...

Get Python Data Analysis 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.