Summary
To sum things up, we've seen two major profilers used with Python: cProfile
, which comes bundled with the language, and line_profiler
, which gives us the chance to look at each line of code independently. We also covered some examples of analysis and optimization using them.
In the next chapter, we will look at a set of visual tools that will help us in our job by displaying the same data we covered in this chapter, but in a graphic manner.