In this chapter, you learned how to define the complexity of code, and looked at different ways to reduce it. We also looked at how to improve performance using architectural trade-offs. Finally, we explored exactly what caching is and how to use it to improve application performance.
The preceding methods concentrated our optimization efforts inside a single process. We tried to reduce code complexity, choose better data types, and reuse old function results. If that did not help, we tried to make trade-offs using approximations, doing less, or leaving work for later. We also briefly discussed the topic of message queues as a potential solution for performance problems. We will revisit this topic later in Chapter 16, Event-Driven and Signal Programming.
In the next chapter, we will discuss some techniques for concurrency and parallel-processing in Python that can also...