Follow these guidelines to optimize small programs:
- Compile the program without KAP, with minimum compiler
optimization and with all compiler run-time checks enabled. Note
the execution time and verify the results. If the program fails
at this step, there is little optimization you can do.
- If you have the time and you know what the program is
supposed to do, you can try to isolate the incorrect code,
correct it, and proceed. This action may not be feasible for
handling problems in large programs, but it might work for
isolated portability problems.
If the problem code is isolated and runs without KAP
optimization, you may be able to run KAP on the rest of the
program and leave out any problematic sections.
You can also refer to the section on KAP problems in this
chapter. You may be able to diagnose and correct some problems,
and then run KAP on your program successfully.
- If the program compiles with minimum compiler optimization
enabled, turn on all optimization except inlining by invoking
- If step 2 succeeds and the results are correct, try
the suggestions in Section 2.13 about
additional performance improvement techniques.
If step 2 fails, try reducing one optimization at a time
/optimize=3 , and any compiler optimizations) until
the program runs correctly. Use the
setting to create a listing of the KAP command-line qualifiers
Previous Page Next Page Contents Index