When a Python program works but takes too long—or grows until memory becomes a constraint—the next step is not guesswork. High Performance Python shows how to measure where time and memory go, understand why, and choose an optimization that fits the problem. Micha Gorelick and Ian Ozsvald take readers from the fundamentals of Python performance through practical techniques for data-heavy and computationally demanding work.
This third edition moves from profiling and core data structures to numerical computing, compilation, concurrency, and real-world case studies. Its central thread is a useful one: make performance decisions with evidence, not hunches.
Find the bottleneck before changing the code
Profiling is the foundation. The book introduces tools for investigating CPU time, memory use, line-by-line behavior, and call stacks, including cProfile, line_profiler, memory_profiler, Scalene, PySpy, and VizTracer. That measurement-first approach helps readers focus effort on the parts of a program that actually need attention.
Make Python work efficiently with data
Chapters on lists, tuples, dictionaries, sets, iterators, and generators explain how everyday choices affect speed and memory. The discussion then extends to NumPy, matrix and vector operations, and DataFrame workflows with Pandas, Dask, and Polars—helpful context for developers dealing with large datasets or repeated numerical work.
Choose the right tools for demanding workloads
Explore GPU considerations, compilation approaches such as Cython and Numba, alternative runtimes including PyPy, and interfaces to native code. Further chapters cover asynchronous I/O, multiprocessing, job queues, clusters, and techniques for reducing RAM use. Rather than presenting one universal shortcut, the book examines trade-offs across different approaches.
Grounded in practical examples
The final section brings performance ideas into settings including machine learning, journalism, cyber reinsurance, and quant finance. These examples connect the technical material to the kinds of constraints that arise in working systems.
Who will find it useful?
The publisher positions this edition for intermediate-to-advanced readers. It is especially relevant to Python developers, data scientists, and machine-learning practitioners who already work with Python and want a more systematic way to investigate performance problems.
For readers ready to look beyond “make it faster” and ask what is slow, why it is slow, and which change is worth making, this edition offers a substantial, hands-on technical reference. 💻
User Reviews
Only logged in customers who have purchased this product may leave a review.
Original price was: $60.34.$30.17Current price is: $30.17.

There are no reviews yet.