PacktLib: Python High Performance Programming

Python High Performance Programming

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Benchmarking and Profiling

Designing your application

Writing tests and benchmarks

Finding bottlenecks with cProfile

Profile line by line with line_profiler

Optimizing our code

The dis module

Profiling memory usage with memory_profiler

Performance tuning tips for pure Python code

Summary

Fast Array Operations with NumPy

Getting started with NumPy

Rewriting the particle simulator in NumPy

Reaching optimal performance with numexpr

Summary

C Performance with Cython

Compiling Cython extensions

Adding static types

Sharing declarations

Working with arrays

Particle simulator in Cython

Profiling Cython

Summary

Parallel Processing

Introduction to parallel programming

The multiprocessing module

IPython parallel

Parallel Cython with OpenMP

Summary

Index