HP 3000 Manuals

Optimizing Migrated HP Business BASIC/V Applications [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Migration Guide

Optimizing Migrated HP Business BASIC/V Applications 

To optimize performance of HP Business BASIC/XL applications:

 *  Avoid short integer type. 

    The natural word length in Business BASIC/V 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.

 *  Run the migration aid to change BASIC DATA files that use real data 
    types. 

    Always run the BBCTMPEV.PUB.SYS program to change from MPE V real
    data format to IEEE real data format for the entire BASIC DATA file.
    You can access a compatibility mode BASIC DATA file in an HP Business
    BASIC/XL program; however, program performance will be slow because
    real data changes are performed on each READ and WRITE in
    compatibility mode BASIC DATA files.  BASIC DATA files that do not
    contain real numbers do not need to be converted to native mode BASIC
    DATA files.  Using compatibility mode BASIC DATA files that do not
    contain real numbers will not lower performance.

 *  Use compiler options. 

    Compiler options can significantly reduce the amount of code produced
    and make a big difference in the overall performance of a program.
    The following compiler options are code and performance options:

     *  NO ERROR HANDLING

     *  NO HALT CHECKING

     *  NO RANGE CHECKING

     *  NO REDIM

    Refer to the HP Business BASIC/XL Reference Manual for a detailed
    description of compiler options.



MPE/iX 5.0 Documentation