Summary
This chapter was all about performance. At the start of the chapter, we discussed performance and SPE. We looked at the two categories of performance testing and diagnostic tools—namely, stress-testing tools and profiling/instrumentation tools.
We then discussed what performance complexity really means in terms of the Big-O notation and discussed briefly the common time orders of functions. We looked at the time taken by functions to execute and learned the three classes of time usage—namely real, user, and sys in POSIX systems.
We moved on to measuring performance and time in the next section—starting with a simple context manager timer and moving on to more accurate measurements using the timeit module. We measured the time taken for certain ...