In this recipe, we will take a look at the resulting assembly from two different optimizations: loop unrolling and pass-by-reference parameters. This recipe is important because it will teach you how to dive deeper into how the compiler converts C++ into executable code. This information will shed light on why C++ specifications such as the C++ Core Guidelines make the recommendations it does with respect to optimizations and performance. This is often critical when you're attempting to write better C++ code, especially when you want to optimize it.
Looking at assembly code
Getting ready
Before beginning, please ensure that all of the technical requirements have been met, including installing Ubuntu 18.04 or higher and...