Pipeline efficiency
The general idea
Compilers may or may not be effective at making these optimizations. You are required to take an example of your choice, and compare effects of various levels of compiler optimization and hand-tuning the code, e.g., unrolling the loop by hand, or introducing more variables to create the effect of register renaming.
The challenge
- understand assembly language output from the compiler
- understand the nature of optimizations possible
- be able to see differences resulting from changes in optimization levels
- see how to achieve similar effects by modifying the source code
- find a strategy to measure differences
- be able to relate what you measure to real problems
It is highly recommended that you use a language reasonably close to machine code, i.e., C for your examples, otherwise it will be hard to see what the compiler is doing.
