Where possible, use local variables instead of global variables for loop index variables and bounds.
Whenever possible, ensure references to arrays or array sections refer to contiguous blocks of storage. Noncontiguous memory array references, when passed as parameters, lead to copy-in and copy-out operations.
Keep your array expressions simple so that the optimizer can deduce access patterns more easily and reuse index calculations in whole or in part.
Frequent use of array-to-array assignment and WHERE constructs can impact performance by increasing temporary storage and creating loops. Using -qlist or -qreport can help you understand the performance characteristics of your code, and where applying -qhot could be beneficial. If you are already optimizing with -qipa, ensure you are using the list=filename option, so that the -qlist listing file is not overwritten.