11.3. Optimizing a Simple Program

We must emphasize that some of the observations of similarities and differences in the machine language programs produced by Itanium compilers in Section 11.2 are artifacts arising because the compilers have been asked to act without optimization on a very simplistic program. Those observations should in no way be construed as flaws in any high-level language, any corresponding compiler, or the Itanium architecture.

Clearly there are things in each of these programs that a human programmer would do differently if hand coding in Itanium assembly language. These might include the following:

  • Load the constant 3.14159 into a floating-point register only once, outside the loop.

  • Use only one integer register for i

Get Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.