-
Book Overview & Buying
-
Table Of Contents
Software Architecture with C++ - Second Edition
By :
In this chapter, we explored ways to achieve better performance with our code. We began by understanding how to set up a reliable environment for accurate performance measurements. Then, we discussed how to write microbenchmarks using Google Benchmark, Catch2, and nanobench. Moreover, we covered profiling and saw how to observe runtime behavior using tools and libraries such as Tracy. We also learned how (and why) to implement distributed tracing in complex systems. Along the way, we explored techniques for writing more performant code. We also discussed parallelizing our computations using both standard library utilities and external solutions. Then, we introduced coroutines. You now know what C++20 and C++23 bring, and what the upcoming C++26 could bring, to the coroutine table, as well as how libraries such as libcoro, coost, and Boost.Cobalt help build coroutine-based programs. You’ve also learned how to write your own coroutines. Finally, we looked at code optimization...