Chapter 4. Profiling and Optimization
In this chapter, we will cover the following topics:
- Evaluating the time taken by a command in IPython
 - Profiling your code easily with cProfile and IPython
 - Profiling your code line-by-line with line_profiler
 - Profiling the memory usage of your code with memory_profiler
 - Understanding the internals of NumPy to avoid unnecessary array copying
 - Using stride tricks with NumPy
 - Implementing an efficient rolling average algorithm with stride tricks
 - Processing large NumPy arrays with memory mapping
 - Manipulating large arrays with HDF5