Choosing Intermediate or Generated Code [ Micro Focus COBOL for UNIX COBOL User Guide ] MPE/iX 5.0 Documentation
Micro Focus COBOL for UNIX COBOL User Guide
Choosing Intermediate or Generated Code
If you want to run your code in an unlinked environment, you can choose
whether you want the cob command to output intermediate or generated
(native) code. See the chapter COBOL System Interface (cob) in your
COBOL System Reference for details of how you can do this.
For maximum performance, process your programs to native code, as native
code programs execute more quickly than intermediate code programs.
However, there is a qualification to this. A program that is I/O bound
(that is, spends most of its time moving data to and from files and
devices rather than performing arithmetic on it) derives relatively
little benefit in speed from code generation. Only programs that are
processor bound (that is, spend most of their time operating on data
rather than transferring it) are likely to increase their run-time speed
significantly as a result of code generation.
Although native code gives better performance than intermediate code, you
should be aware that the native code version of a program usually takes
up more space than its intermediate code equivalent, as intermediate code
is very compact. You must thus ensure that you have enough memory and
disk space available to cope with the space overheads of native code.
If your program is divided into a main COBOL program and a number of
subprograms called from the main program, some of the programs can be
processed to intermediate code, others to native code. You can mix the
two quite freely.
MPE/iX 5.0 Documentation