Improving Asynchronous Software Performance
In this chapter, we’ll introduce the performance aspects of asynchronous code. Code performance and optimization is a deep and complex subject, and we can’t cover everything in just one chapter. We aim to give you a good introduction to the subject with some examples of how to measure performance and optimize your code.
This chapter will cover the following key topics:
- Performance measurement tools with a focus on multithreaded applications
- What’s false sharing, how to spot it, and how to fix/improve our code
- An introduction to modern CPUs’ memory cache architecture
- A review of the single-producer-single-consumer (SPSC) lock-free queue we implemented in Chapter 5