The VEC_ routines are designed for optimum efficiency when processing large arrays of data and are consequently far more efficient at performing this task than the corresponding VAL_ functions. When possible, VEC_ routines should always be used in preference to VAL_ functions unless the number of calculations to be performed is small (typically 1000 or less).
The main disadvantage in using VEC_ routines is likely to be the
additional programming effort, because workspace arrays will probably be
required and may have to be acquired dynamically -- unless only a single
operation is being performed.
Also, certain operations cannot be performed using VEC_ routines
(summing the pixels in an image for example) and, in such cases,
routines from the NUM facility (section
) may have
to be used instead.
Note, however, that if NUM_ routines are used, then security against
numerical errors is more difficult to achieve and (especially in the case of
arithmetic operations) VAX-specific programming techniques may be
required.
The resulting applications will not then be portable.
PRIMDAT --- Processing of Primitive Numerical Data