Next Previous Contents

3. Remember that the compiler does not optimize

The compiler needs hints from you about the code to generate. When accessing indexed data structures, get a pointer to the element and use this pointer instead of calculating the index again and again. If you want to have your loops unrolled, or loop invariant code moved outside the loop, you have to do that yourself.


Next Previous Contents