If the code is written as in the second example, pghpf generates one schedule and reuses this schedule for second communication. Since the value of v is not changed between statements and its second use is in the loop, pghpf may be able to use a single schedule for the different communications, thus reducing the overhead required for producing the communications schedule. Another technique that allows the compiler to optimize this type of communications is indirection array alignment. Another optimization that a programmer may use involves generating indirection arrays to reduce the use of expensive scalar communications. If you are comparing an HPF program to check its performance using several different algorithms, there are several relevant parameters to use when measuring performance.
Parallel speedup measures the decrease in program execution time as more processors are added.
If is the time to execute the program with i processors, then perfect speedup occurs when . Another measure of speedup that may be used is the comparison of a program's parallel execution time with the execution time of an optimized sequential version of the program.