Ground rules for spatial operations algorithm development (cont’d)
GR 10: Performance testing can be difficult :
- in the literature, operation counts and counts of square root and transcendental function
calls are often used to compare algorithms. Such a practice is generally a very poor
predictor of performance and should only be used for rough judgments,
- sometimes algorithms are tested in isolation. A loop is coded and the loop time
determined from system timing utilities. The candidate algorithm is entered into the
loop, timed for a large number of replications, the loop time removed and the average
processing time is computed. This kind of testing is called in situ testing. In situ testing
can also yield misleading results, especially for the systems as outlined in GR 1. For
the simple programs used in situ testing there is no competition for system resources
and all the power of a super-scalar architecture will be used. The performance results
- In vivo testing is performance testing in the context of a much larger application
program. In this case there will be competition for system resources and algorithm
performance may be impacted,
- while in vivo testing is always desirable it may not be possible early in a large
development program. The developer must then use the other forms of assessment
that are available while keeping in mind what might happen in the final product,
- it is always advisable to perform in vivo tests as a final confirmation of the algorithm