HP 3000 Manuals

Optimizing Performance [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Migration Guide

Optimizing Performance 

To optimize performance of HP Business BASIC/XL applications:

 *  Avoid short integer type. 

    The natural word length in HP Business BASIC/260 programs is 16 bits.
    The natural word length in HP Business BASIC/XL programs is 32 bits.
    Performance of short integer type on MPE XL is slow compared to
    integer type because short integer type usually has to be changed to
    integer type to do the arithmetic operation and then the result is
    changed back from integer to short integer.  Avoid using short
    integer type as much as possible to maximize performance.

    Example:

         10 SHORT INTEGER A,B,C
         20 A = B + C

    In this example, B and C are changed to integer values, then the two
    integer values are added together.  The result, A, is changed back to
    short integer type.

    You will not always be able to avoid short integer type for
    parameters to external routines, intrinsic routines, or database
    access.  For instance, the status array for TurboIMAGE database
    access is short integer type.

 *  Use compiler options. 

    Compiler options can significantly reduce the amount of code space
    produced during compilation.  The following compiler options are code
    and performance options:

     *  ERROR

     *  HALT

     *  OPTIMIZE

    Refer to the HP Business BASIC/XL Reference Manual for detailed
    information about using compiler options.



MPE/iX 5.0 Documentation