11.8. Why Does Optimization “Break” Applications?

As indicated earlier in this chapter, optimization can sometimes break an application that executes correctly without optimization. Why does this happen? The most frequent reason is that the code violates the assumptions that the optimizer makes about the language. Sometimes the code does not conform to language standards. In other cases, code is poorly structured or expects architecture-dependent behavior that is not applicable. This problem is typical of old code that has not been modified to run on a newer machine. Other assumptions involve local variables appearing as static and the automatic zero initialization of variables.

Optimizer assumptions are language dependent as well as optimization-level ...

Get HP-UX 11i Tuning and Performance 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.