Optimizing Migrated BASIC/V Applications [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Migration Guide
Chapter 14 Optimizing Migrated BASIC/V Applications
To optimize performance of HP Business BASIC/XL applications:
* Avoid short integer type.
The natural word length in HP 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 using 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 migrate BASIC DATA files that use real data
types.
Always run the migration aid 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 of real
data changes. are performed on each READ and WRITE in compatibility
mode BASIC DATA files.
* 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