Maximizing C++ compiler optimization parameters
In this last section, we will understand how advanced and amazing modern C++ compilers are at optimizing the C++ code that the developers write. We will understand how compilers optimize the C++ code during the compilation, linking, and optimization stages to generate the most efficient machine code possible. We will understand how compilers optimize high-level C++ code and when they fail to do the best job. We will follow that up with a discussion on what the application developer can do to aid the compilers in their optimization task. Finally, we will look at different options available in modern C++ compilers by looking specifically at the GNU compiler (GCC). Let us start by understanding how compilers optimize our C++ program.
Understanding how compilers optimize
In this sub-section, we will understand the different compiler optimization techniques that the compiler employs during its many passes over the high-level C++ code...